sed: support GNU-like '\t' escape in substitutions

This commit is contained in:
Denis Vlasenko
2007-11-13 16:48:10 +00:00
parent 6df9e3c9a3
commit 40276648ab
3 changed files with 13 additions and 6 deletions

View File

@@ -57,6 +57,7 @@ testing "sed s arbitrary delimiter" "sed -e 's woo boing '" "boing\n" "" "woo\n"
testing "sed s chains" "sed -e s/foo/bar/ -e s/bar/baz/" "baz\n" "" "foo\n"
testing "sed s chains2" "sed -e s/foo/bar/ -e s/baz/nee/" "bar\n" "" "foo\n"
testing "sed s [delimiter]" "sed -e 's@[@]@@'" "onetwo" "" "one@two"
testing "sed s with \\t (GNU ext)" "sed 's/\t/ /'" "one two" "" "one\ttwo"
# branch
testing "sed b (branch)" "sed -e 'b one;p;: one'" "foo\n" "" "foo\n"