I have two text files that I would like to parse, and then combine the two lines parsed into a single file using a call grep. For instance:
Foo.txt Foo2.txt
*1 A
2 B
*3 C
4 D
*5 E
I would like to have
FooFinal.txt
2B
4D
I am trying to use the grep command as such
grep -A 1 '*' Foo.txt|grep -v '*'
but I'm not sure how grep both files are.
I would suggest using the command to concatenate paste, but I'm not sure.
Also, if this is hard to understand, let me know so that I can clarify.
Thank!
source
share