how to identify the first occurence of a patten by using sed or awk
e.g.: my file is as following. I want to identify
the lines which contains the first occurence of "\"
aa aaaaaaaaaa \
bbbbb cccc \
ddddd ddddddd
eeeeeeee eesss \
ffffff dddddddddd
so the line I want to be printed out are:
aa aaaaaaaaaa \
eeeeeeee eesss \
(note: "bbbbb cccc \" is not the one i want because the "\" is
the second
occurence, not the first occurence)
great thanks advance!
--
Posted via http://dbforums.com