Alex Rivera | Logout

unix join separator char

Asked 2009-11-12T13:56:37.620
34

Sorry for the maybe trivial question.

I fought a bit with the unix join command, trying to get tabs instead of whitespaces as the default separators. -t is the argument, but these don't work (ubuntu 9.10 64 bit 2.6.31-14, GNU coreutils version 7.4)

join file1 file2 -t"\t"
join file1 file2 -t="\t"
join file1 file2 -t="\\t"
join file1 file2 -t $"\t"

Et cetera. Of course, I can always use some inelegant solution like

join file1 file2 > output
sed "s/ /\t/g" output

But I wanted to look smart :-) Moreover, if there's a -t argument, it must work.

Edit
Report

1 Answer

6

You can enter tab by pressing CTRL+v Tab

join -t '<CTRL+v><Tab>' file1 file2
answered 2012-09-06T20:53:56.427

Your Answer