Patch from Colin Watson (mangled slightly by Rob Landley):

This patch implements the 'T' command in sed. This is a GNU extension,
but one of the udev hotplug scripts uses it, so I need it in busybox
anyway.

Includes a test; 'svn add testsuite/sed/sed-branch-conditional-inverted'
after applying.
This commit is contained in:
Rob Landley
2005-05-18 06:34:37 +00:00
parent 5797c7f0ef
commit 93850a56b2
2 changed files with 24 additions and 6 deletions

View File

@@ -0,0 +1,14 @@
busybox sed 's/a/1/;T notone;p;: notone;p'>output <<EOF
a
b
c
EOF
cmp -s output - <<EOF
1
1
1
b
b
c
c
EOF