Re: sed append question

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



Hi,

On Wed, Aug 19, 2009 at 16:20, Joseph L.
Casale<JCasale@xxxxxxxxxxxxxxxxx> wrote:
> '/string/a \\tstuff\t\t\tmorestuff' != "/string/a \\tstuff\t\t\tmorestuff"

Yes, indeed... The rules of quoting and backslashes in the shell are
not very uniform and can get quite tricky... Also, the \t is
interpreted by sed, and AFAIK it is available in GNU sed only, so the
syntax you are using above might not be very portable to other
versions of "sed". If your script gets this tricky it's probably time
to move to Perl, which can also do that easily in an one-liner and, in
this case, might actually be more portable. (Heck, it might even be
more readable!)

HTH,
Filipe
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux