Welcome to the Power Users community on Codidact!
Power Users is a Q&A site for questions about the usage of computer software and hardware. We are still a small site and would like to grow, so please consider joining our community. We are looking forward to your questions and answers; they are the building blocks of a repository of knowledge we are building together.
Post History
You could take the list you have, then sort it and remove redundant lines. Sorting programs come with the OS nowadays. I've had to do such things occasionally, so I created a program to eliminate...
Answer
#3: Post edited
- You could take the list you have, then sort it and remove redundant lines.
- Sorting programs come with the OS nowadays. I've had to do such things occasionally, so I created a program to eliminate adjacent redundant lines from a text file.
- For example, I copied your GIT output above into the file a.txt, then ran these commands:
- <pre>
- C:\temp>sortf a.txt b.txt
- C:\temp>elim_redun b.txt c.txt
- 240 lines read, 165 lines removed in 43 repeat blocks, 75 lines written.</pre>
- This whole process, including running GIT, could easily be canned into a script. It could clean up the intermediate files, too.
- <blockquote> maybe better suited as a comment as the mentioned programs don't seem to be publicly available?</blockquote>
- I was answering with a concept, not necessarily a particular program. A program like <tt>elim_redun</tt>, above, is so trivial I didn't think it was worth elaborating on. I just checked, and its source code is a whopping 74 lines long. That includes comments and blank lines.
- Nonetheless, <tt>elim_redun</tt> and lots of other stuff is included in the full runtime release at <a href="http://www.embedinc.com/pic/dload.htm">www.embedinc.com/pic/dload.htm</a>. I just refreshed it to make sure the exact same version I'm running on my system is available there.
- That software is open source, too. The software release includes a script to grab copies of our GitHub repositories, and includes other tools for building everything from the source code that will then be local on your system.
- You could take the list you have, then sort it and remove redundant lines.
- Sorting programs come with the OS nowadays. I've had to do such things occasionally, so I created a program to eliminate adjacent redundant lines from a text file.
- For example, I copied your GIT output above into the file a.txt, then ran these commands:
- <pre>
- C:\temp>sortf a.txt b.txt
- C:\temp>elim_redun b.txt c.txt
- 240 lines read, 165 lines removed in 43 repeat blocks, 75 lines written.</pre>
- These commands result in the file <tt>c.txt</tt>, which is the list of files you are looking for.
- This whole process, including running GIT, could easily be canned into a script. It could clean up the intermediate files, too.
- <blockquote> maybe better suited as a comment as the mentioned programs don't seem to be publicly available?</blockquote>
- I was answering with a concept, not necessarily a particular program. A program like <tt>elim_redun</tt>, above, is so trivial I didn't think it was worth elaborating on. I just checked, and its source code is a whopping 74 lines long. That includes comments and blank lines.
- Nonetheless, <tt>elim_redun</tt> and lots of other stuff is included in the full runtime release at <a href="http://www.embedinc.com/pic/dload.htm">www.embedinc.com/pic/dload.htm</a>. I just refreshed it to make sure the exact same version I'm running on my system is available there.
- That software is open source, too. The software release includes a script to grab copies of our GitHub repositories, and includes other tools for building everything from the source code that will then be local on your system.
#2: Post edited
- You could take the list you have, then sort it and remove redundant lines.
- Sorting programs come with the OS nowadays. I've had to do such things occasionally, so I created a program to eliminate adjacent redundant lines from a text file.
- For example, I copied your GIT output above into the file a.txt, then ran these commands:
- <pre>
- C:\temp>sortf a.txt b.txt
- C:\temp>elim_redun b.txt c.txt
- 240 lines read, 165 lines removed in 43 repeat blocks, 75 lines written.</pre>
This whole process, including running GIT, could easily be canned into a script. It could clean up the intermediate files, too.
- You could take the list you have, then sort it and remove redundant lines.
- Sorting programs come with the OS nowadays. I've had to do such things occasionally, so I created a program to eliminate adjacent redundant lines from a text file.
- For example, I copied your GIT output above into the file a.txt, then ran these commands:
- <pre>
- C:\temp>sortf a.txt b.txt
- C:\temp>elim_redun b.txt c.txt
- 240 lines read, 165 lines removed in 43 repeat blocks, 75 lines written.</pre>
- This whole process, including running GIT, could easily be canned into a script. It could clean up the intermediate files, too.
- <blockquote> maybe better suited as a comment as the mentioned programs don't seem to be publicly available?</blockquote>
- I was answering with a concept, not necessarily a particular program. A program like <tt>elim_redun</tt>, above, is so trivial I didn't think it was worth elaborating on. I just checked, and its source code is a whopping 74 lines long. That includes comments and blank lines.
- Nonetheless, <tt>elim_redun</tt> and lots of other stuff is included in the full runtime release at <a href="http://www.embedinc.com/pic/dload.htm">www.embedinc.com/pic/dload.htm</a>. I just refreshed it to make sure the exact same version I'm running on my system is available there.
- That software is open source, too. The software release includes a script to grab copies of our GitHub repositories, and includes other tools for building everything from the source code that will then be local on your system.
#1: Initial revision
You could take the list you have, then sort it and remove redundant lines. Sorting programs come with the OS nowadays. I've had to do such things occasionally, so I created a program to eliminate adjacent redundant lines from a text file. For example, I copied your GIT output above into the file a.txt, then ran these commands: <pre> C:\temp>sortf a.txt b.txt C:\temp>elim_redun b.txt c.txt 240 lines read, 165 lines removed in 43 repeat blocks, 75 lines written.</pre> This whole process, including running GIT, could easily be canned into a script. It could clean up the intermediate files, too.