New answers tagged


From what I could understand from your question, you just want to get the lines 2 and 3 from every file and output it into a new file. Here is a script to do so: find . -name "*.doc" | xargs awk 'FNR==2||FNR==3{print}' > new_file xargs will make awk process every file output by find. awk will print lines 2 and 3 from every new file it is supplied. In ...

Top 50 recent answers are included