bug-coreutils
[Top][All Lists]
Advanced

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

Re: how to replace tab by '\t' (literally) with tr?


From: Eric Blake
Subject: Re: how to replace tab by '\t' (literally) with tr?
Date: Mon, 28 Dec 2009 21:00:51 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Andreas Schwab on 12/28/2009 3:51 PM:
> Incidentally,
> due to your use of double quotes this is a no-op ("\t" and "\\t" are the
> same).

Actually, "\t" is undefined in portable shell.  While bash treats it like
"\\t", dash does interpolate it into a tab character.

But the rest of this email is correct - the only way to get a one-to-many
replacement is to use a tool like sed, awk, or perl, and not one of the
coreutils.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAks5fvMACgkQ84KuGfSFAYB46wCfSXSuk3MM7U1fYAK0F5ponGiV
JcgAoKsgZI1mfGA3uX6cgBgiDdQjg+Qa
=fQ2O
-----END PGP SIGNATURE-----




reply via email to

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