Le 2002.01.20 00:00, [EMAIL PROTECTED] a écrit : > That file looks that way (minus the '|'s): > > |gpg: encrypted with 2048-bit ELG-E key, ID 274AAD03, created 2001-12-22 > | "Andreas Maresch <[EMAIL PROTECTED]>" > > So, all I have to do is to get the text between the first '"' and the > '<' (minus the last space). >
I think sed is more appropriate: > cat file | grep "\".*\"$" | sed 's/.*\"\(.*\) <.*/\1/' Two steps. First gets the line with "" and then removes all before the first " and all after the space followed by a < Romuald.