sed help
Paul John Falstad
pfalstad at phoenix.Princeton.EDU
Wed Dec 5 05:09:08 AEST 1990
In article <99.2757f296 at vax1.cc.lehigh.edu> lubkt at vax1.cc.lehigh.edu writes:
>A question on sed:
> I want to replace a string xyz:KJSDKJSDJS: by xyz:: in a
>password file. The string "KJSDKJSDJS" is arbitrary. So I try:
> sed -e 's/xyz:\??:/xyz::' $passwd
Try:
sed '/^xyz:/s/:[^:]*:/::/' $passwd
--
>From somewhere in front, you hear a repulsive squelching mumble, as if a
chattering orangutan has suddenly had its mouth crammed full of earthworms.
"You're invading my personal space!" shrieks the travel agent, rearing back
from you like an offended snake. She is probably from California.
More information about the Comp.unix.shell
mailing list