I would love to use that. But SCO 5.0.5's version of awk seems to not work
with this
-----Original Message-----
From: Drew Moseley [mailto:">drewmoseley@mindspring.com]
Sent: Tuesday, January 04, 2000 6:59 PM
To: Chris Fowler; ">ale@ale.org
Subject: RE: [ale] SED question
>
> cat /etc/inittab | sed s/off/respawn > /tmp/inittab.tmp ; mv
> /tmp/inittab.tmp /etc/inittab
>
> then it will replace all occurence of off.
>
> How can I cahnge the above statement to change it on the line that just
has
> au00
>
Do you need it to be sed? awk should be able to handle this as follows:
cat /etc/inittab | awk '(/au00/) {gsub("off", "respawn")} {print}'
Drew
--
To unsubscribe: mail ">majordomo@ale.org with "unsubscribe ale" in message
body.
--
To unsubscribe: mail ">majordomo@ale.org with "unsubscribe ale" in message body.