I have two text files which I would like to parse through, then combine the two lines parsed into one file using a grep
call. For example:
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 attempting to use the grep command as so
grep -A 1 '*' Foo.txt|grep -v '*'
but, I am not sure how to grep both files.
I would assume one would use a paste
command to concatenate, but I am not sure.
Also, if this is difficult to understand, please let me know so I can clarify.
Thanks!