Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

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

66%
+2 −0
Q&A Get unique list of all files in a git repository, which I modified

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...

posted 2y ago by Olin Lathrop‭  ·  edited 2y ago by Olin Lathrop‭

Answer
#3: Post edited by user avatar Olin Lathrop‭ · 2022-02-05T17:05:08Z (about 2 years ago)
  • 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 by user avatar Olin Lathrop‭ · 2022-02-05T16:39:21Z (about 2 years ago)
  • 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 by user avatar Olin Lathrop‭ · 2022-02-05T15:14:36Z (about 2 years ago)
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.