parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

add file name to output file along with the line extracted


From: Kishore Reddy
Subject: add file name to output file along with the line extracted
Date: Thu, 26 Jan 2017 08:23:59 -0600

Dear group,

I am trying to extract 10th line from group of files.
I am able to do it with 

find . -name "*.final.out" | parallel "awk 'NR ==10' {} >> result.txt"

However, I need to add a filename in the output file for every line so that I can identify from which file the line came from.

Any help is appreciated.


warm regards,
Kishore R. Anekalla


reply via email to

[Prev in Thread] Current Thread [Next in Thread]