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
You can enter tab by pressing CTRL+v Tab
join -t '<CTRL+v><Tab>' file1 file2
man join says, that the options have to come in front of the filenames. Have you tried
join -t "\t" file1 file2
?
Edit: Reflecting Tonio's answer, the correct line would read
join -t $'\t' file1 file2
Other way is:
join -t "`echo -e "\t"`" file1 file2`
or in a more bash-fashion:
join -t "$(echo -e "\t")" file1 file
An alternate trick that seems to work is to enclose the -t option in quotes with the literal tab character. This looks like:
join '-t ' ...
with a variable space between the t and the closing quote (since it's a tab).
Typed, it's:
join<Spc>'-t<Ctrl-v><Tab>' ...
join -t "`echo '\t'`" file1 file2
ps: on my machine, Red Hat Enterprise Linux Server release 5.1 (Tikanga), the command join -t $'\t' file1 file2
returns "Illegal variable name".
I think it takes a variable generated on-the-fly
Try
join file1 file12 -t $'\t'