[olug] Unix Tip: MAKING TAB WORK

Unix Guru Universe listserv at ugu.com
Sun Dec 29 18:57:56 UTC 2002


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

			      UNIX GURU UNIVERSE 
			         UNIX HOT TIP

			Unix Tip 2189 - December 29, 2002

		    http://www.ugu.com/sui/ugu/show?tip.today

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


MAKING TAB WORK

THE PROBLEM: 

How do you insert a 
character in the 
command line whose 
key has special
significance to the 
shell(csh/tcsh)?  

For example say I want 
to join 2 tab delimited 
files.  What I want to 
say is this:

join -t"<TAB>" file1 file2

Of course, when you 
type the tab key or ^I 
the shell just beeps 
because it thinks you 
want a complete a 
filename. Many commands 
will not interperet "\t" 
as a tab.

THE SOLUTION:

^V (CTRL-V) will cause 
the next key press to be 
interpreted literally.  
So to enter the command 
described above you would 
type the following:

join -t"<CTRL-V><TAB>" file1 file2.

Problem solved!




--------------------------------------------------------------------------
To Subscribe:    http://www.ugu.com/sui/ugu/show?tip.subscribe
To Unsubscribe:  http://www.ugu.com/sui/ugu/show?tip.unsubscribe
To Submit A Tip: http://www.ugu.com/sui/ugu/show?tip.today

==========================================================================
DISCLAIMER: All UNIX HOT TIPS ARE OWNED BY THE UNIX GURU UNIVERSE AND ARE
NOT TO BE SOLD, PRINTED OR USED WITHOUT THE WRITTEN CONSENT OF THE UNIX 
GURU UNIVERSE. ALL TIPS ARE "USE AT YOUR OWN RISK". UGU  ADVISES THAT 
ALL TIPS BE TESTED IN A NON-PRODUCTION DEVELOPMENT ENVIRONMENT FIRST.

Unix Guru Universe - www.ugu.com - tips at ugu.com - Copyright 1994-2001
==========================================================================




More information about the OLUG mailing list