[SATLUG] vi tutorials?

Travis H. solinym at gmail.com
Mon Mar 20 18:43:53 CST 2006


On 3/20/06, Bruce Dubbs <bdubbs at swbell.net> wrote:
> > Here's a useful command:
> > :g/RE/s/foo/bar/g
>
> sed can do it as a one liner:
>
> sed -i -e "s/foo/bar/g" filename

Actually, no, that replaces foo with bar on every line, not just the
lines containing RE.

And, sed is essentially just ed working on stdin/stdout.
--
Security Guru for Hire http://www.lightconsulting.com/~travis/ -><-
GPG fingerprint: 9D3F 395A DAC5 5CCC 9066  151D 0A6B 4098 0C55 1484


More information about the SATLUG mailing list