[BusyBox] separating multiple sed commands
Frank Lenaerts
lenaerts.frank at pandora.be
Fri Jan 2 20:07:01 UTC 2004
While migrating from a 0.60.x (busybox 0.60.5 in Debian Sid) to a
1.0.0-preX (busybox-cvs version from 20031212 in Debian Sid,
corresponding to 1.0.0-pre4) busybox, I noticed a difference in the
sed's behaviour.
In the older version, I could use a semicolon to separate sed
commands e.g.:
sed 's/.*key=\(.*\)/\1/ ; s/ .*//' some_file ;
In the newer version, this does not work anymore and I get a "sed: bad
option in substitution" error. When I rewrite the sed commands without
a semicolon however, everything works fine e.g.:
sed '
s/.*key=\(.*\)/\1/
s/ .*//
' some_file ;
This can thus be used as a work-around, but I don't know if the fact
that using a semicolon to separate sed commands results in an error is
the purpose (i.e. a builtin limitation) or not (i.e. a bug).
--
lenaerts.frank at pandora.be
gpg fingerprint: A41E A399 5160 BAB9 AEF1 58F2 B92A F4AB 9FFB 3707
gpg key id: 9FFB3707
Those who do not understand Unix are condemned to reinvent it, poorly."
-- Henry Spencer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20040102/21ac5704/attachment-0002.pgp
More information about the busybox
mailing list