Oliver Endriss wrote: > This works: > | sed -ne '/define APIVERSION/ { s/^.*"\(.*\)".*$/\1/p; }' config.h Well, in that variant the ; to separate the next command isn't needed any more, and the { } isn't necessary any more neither. Cheers, Udo PS: As I said, mine is shorter! ;b