I've two documents that are the result of SQL Queries.For exemple i've my Doc1.lst that is :     John1    0    Julien  10    Jules3   0    Julie   30On this Doc1.lst, I used sed to have only the name part, so Doc2.lst is :    John1    Julien    Jules3    JulieI don't master enough the sed command to catch only the numbers, so I would like to know if there is a way to create a Doc3.lst that take the Doc1.lst and delete into it the content of Doc2.lstIt would be a sort of reversed catenate.By the way, if you have the sed command to catch only the numbers that would be great.
A sort of reversed cat
shell;sed;cat
To get the output you want, you could either use awk, cut or sed. The former is preferable.If your file Doc1.lst is as followJohn1    0Julien  10Jules3   0Julie   30The following awk command will get the output you want. Assuming field separator is a space.awk '{print $1}' Doc1.lst Using cutcut -d' ' -f1 Doc1.lstOr using sed. Note. sed is a stream editor and you don't want to use sed for this task. But here is the line you want anyway.sed 's/\([a-zA-Z]*\).*/\1/' Doc1.lst