Insert TAB in echo statement

Hi,

Can some1 help me to output a tab in an echo statement.
I have tried
echo "RNC: \t NODEB"
but dont get the correct output.

I am a beginnger to unix, so pls hold back the laughs....if u can

using gnu's echo you need to ad the -e argument.

echo -e "RNC: \t NODEB"

as a beginner you won't perhaps know this (and, besides, this is most often ignored by even the most veteran UN*Xers): 'echo' should not be used. Use "print" instead:

print - "abc\tdef"

will do exactly what you want - regardless of what version of print you are using.

bakunin

What Unix are you using? In GNU/Linux, "print" is an alias to "run-mailcap" which certainly does not do what you're saying it does. It doesn't exist at all in OpenBSD, which is the other Unix I've got access to at the moment.

Perhaps bakunin was thinking of printf which is built-in to ksh and bash and should also be available as an executable.

"print" is an internal ksh-command. AFAIK it is also an internal command in the bash.

I don't know about OpenBSD and I definitely don't know about Linux (honestly, IMHO Linux is to UNIX what Lego is to construction works), but as much as I know there are many flavours of Linux all with different sets of (mostly unsensible) aliases, therefore what you say may or may not be true for another of the seveteen dozens of major distribution. (Still, this disdain of mine may reflect only personal preferences and I don't intend to start a religious war (tm) here about Unix flavours or flavours of somewhat-Unix-like OSes.)

I'd like to take back my obviously inflammatory remark in the general form i offered it and state instead that what i said is only true for real OSes with real shells, which have an internal "print" command.

bakunin

PS: i use AIX, HP-UX, SunOS and (most enjoyable) VMS.