« xf86cfg | Main | graphic »

perl over sed

very useful way of using perl as a replacement for sed when sed just doesn't cut it - eg
cat blah | perl -p -i -e 's/foo/bar/g'
perl -pe 's/,/-/; s/,/ /; s/,/ /; s/,/ /; s/,/./g;' infile > outfile

About

This page contains a single entry from the blog

The previous post in this blog was xf86cfg.

The next post in this blog is graphic.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 3.33