I have a file (myFile
) with 20000 lines and another file (myIndex
) like this containing the lines that must be extracted from myFile
:
4
10
1200
..
..
I want to extract these lines with sed
:
sed '10!d' myFile
How can I put the file name instead of 4,10
like this:
sed 'myIndex!d' myFile
Or is there a similar function in awk?