bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GNU sed fails to insert tab at beginning of line in a certain way


From: Warren Turkal
Subject: GNU sed fails to insert tab at beginning of line in a certain way
Date: Wed, 3 Nov 2010 10:21:14 -0700

I think I may have found a bug, but I am not entirely sure.

Try the following in an empty directory:
$ sed --version
GNU sed version 4.2.1
...copyright message and bug reporting info snipped...
$ cat << HERE > a
aaa
bbb
HERE
$ sed '$a\tblah' a # expected an initial tab on the last line
aaa
bbb
tblah
$ sed '$a \tblah' a # same expectation
aaa
bbb
tblah
$ sed '$a\t\tblah' a # strange result
aaa
bbb
t       blah
$ sed '$a\\tblah' a # Why does this work?
aaa
bbb
        blah

I don't really understand why the \t doesn't work when it comes first in the
append command. Is that expected behavior?

One more thing, the docs and the --version string conflict on where to
submit bugs. It looks like the docs should be updated to use the
address@hidden instead of the address@hidden, or maybe the --version
string should be updated.

Thanks,
wt


reply via email to

[Prev in Thread] Current Thread [Next in Thread]