FreeBSD Security Advisory FreeBSD-SA-03:99.freebsd-sa
Chris Costello
chris at FreeBSD.org
Mon Apr 7 20:35:29 PDT 2003
On Saturday, April 05, 2003, Anthony Schneider wrote:
> Y"KNOW, sed accepts filenames as arguments.
>
> (it also really doesn't need the -e)
>
> > % cat /path/to/FreeBSD-SA-XX:XX.txt.asc\
> > | sed -e 's/FreeBSD-SA-\([0-9]*\):\([0-9]*\)/FreeBSD-SA-19\1:\2/g'
Even still, you'd get nailed on comp.unix.shell and
comp.unix.admin for this with a UUOC (Useless Use of Cat(1))
award. If for some reason sed(1) did not take a filename
argument, then
sed EXPR < filename
is still cleaner than
cat filename | sed EXPR
--
Chris Costello <chris at FreeBSD.org>
FreeBSD Project http://www.FreeBSD.org/
TrustedBSD Project http://www.TrustedBSD.org/
More information about the freebsd-chat
mailing list