21 Aug
2007
21 Aug
'07
13:46
On Tuesday 21 August 2007 01:51, Leen de Braal wrote:
Hi all,
Need some help with sed:
...
I used sed 's/^ /\t/' txtfile, but I do not get a tab. Besides, this might do more then just the first space, I guess.
Assuming you're using bash, you need to use the $'string literal with \t escapes' notation. The dollar sign and single quote marks enable the backslash escapes. If you want to use a newline, it needs to be preceded by a backslash, which will then need to be double, so a newline in a $'...' string will look like $'... \\\n ...'
Could someone shed some more light here?
-- L. de Braal
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org