YA{sed}{question}
Tim Radzykewycz
radzy at calma.UUCP
Fri Nov 22 04:26:14 AEST 1985
In article <294 at geowhiz.UUCP> larry at geowhiz.UUCP (Larry McVoy) writes:
>[input]
>{garbage}#{complete garbage}#{more garbage}
>....
>[desired output]
>{garbage}#{complete garbage}{more garbage}
>....
[has been using:]
>sed -e 's/#[^#]*#/&YUCK/g' -e 's/#YUCK//g'
Better is:
sed -e 's/#\([^#]*\)#/#\1/g'
There is a reasonably good description of regular expressions (as used
by sed) in the man page for ed.
--
Tim (radzy) Radzykewycz, The Incredible Radical Cabbage
calma!radzy at ucbvax.ARPA
{ucbvax,sun,csd-gould}!calma!radzy
More information about the Comp.unix
mailing list