bug-coreutils
[Top][All Lists]
Advanced

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

Re: Join tab delimiter


From: Eric Blake
Subject: Re: Join tab delimiter
Date: Sat, 28 Mar 2009 07:22:05 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.6.666

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

According to Gorodilov Alexey on 3/28/2009 5:36 AM:
> I try
> join '\t' file1 file2

Are you sure that's what you typed?  When I tried I got "extra operand
`file2'".  But reading between the lines, it looks like you were trying to
use -t.  When reporting problems, it is essential to make it easy for
others to reproduce what you did, by copying and pasting from your
terminal rather than retyping.

> but join writes, that
> join: illegal tab character specification

It looks like you are using an older version of coreutils, since the
output message now mentions "multi-character tab `\\t'" rather than
"illegal tab character" (after all, there is no law prohibiting what you
attempted).  Consider upgrading; the latest stable version is 7.1, with
7.2 due any day now.

Meanwhile, the trick is to use a literal tab on your command line.  One
way is to use ctrl-v followed by tab, although that's hard to render in
email.  Or, if you use bash, you could try:

$ join -t $'\t' file1 file2

Or there's even this more portable alternative (although it costs a fork):
$ join -t `printf '\t'` file1 file2

And while it would be possible for join to recognize backslash escape
sequences as a single join character, rather than the current complaint,
no one has written a patch to do that.

- --
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

iEYEARECAAYFAknOJH0ACgkQ84KuGfSFAYDgPACghvbKGbrkT2nSfUt0A0xCxJ6/
8dcAn0KTcadNl4So7yWia7v9Q0cVeHt3
=yLBV
-----END PGP SIGNATURE-----




reply via email to

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