procmail
[Top] [All Lists]

Re: Passing \t argument via shell does not work - why ?

2007-08-16 23:12:09
mark david mcCreary wrote:

LISTDESCRIPTION=`/bin/echo $MYLISTSDATA | /usr/bin/awk -F\t '{print 
$8}'`

What's the difference between passing in an = symbol and the \t ?
 

 From the gawk man page 
http://www.gnu.org/manual/gawk/html_node/Command-Line-Field-Separator.html

As a special case, in compatibility mode (see Options 
<http://www.gnu.org/manual/gawk/html_node/Options.html#Options>), if the 
argument to -F is `t', then |FS| is set to the TAB character.  If you type 
`-F\t' at the shell, without any quotes, the `\' gets deleted, so awk figures 
that you really want your fields to be separated with tabs and not `t's.  Use 
`-v FS="t"' or `-F"[t]"'  on the command line if you really do want to separate 
your fields with `t's.


-- 
Klaus Johannes Rusch
KlausRusch(_at_)atmedia(_dot_)net
http://www.atmedia.net/KlausRusch/
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>