2
votes
3answers
183 views

Filter file when a column is in whitelist

Suppose I have two files, File A: a,abcdef b,bcdefa c,cdefab a,defabc b,efabcd c,fabcde And File B: a b The output I'm looking for is: a,abcdef b,bcdefa a,defabc b,efabcd So, basically, I ...
3
votes
3answers
3k views

How to replace part of a text file between markers with another text file?

Say I have a text file like this: # custom content section a b ### BEGIN GENERATED CONTENT c d ### END GENERATED CONTENT I'd like to replace the portion between the GENERATED CONTENT tags with the ...
3
votes
1answer
171 views

Command-line tool to measure how fast a file is growing?

Is there a command-line tool to measure how fast a text file is growing, in units of lines/second? For small-ish files, I can do something with watch and wc -l, but that measures the file anew each ...