LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   tab delimiter (https://www.linuxquestions.org/questions/programming-9/tab-delimiter-53284/)

codename000 04-03-2003 04:34 PM

tab delimiter
 
i know that delimiter is set defualt as tab, but if i have to use a delimiter * followed by a tab for the command paste, what can i do??
in C, \t is used, but in shell script?

paste -d'*\t' doc1 doc2? (but the pair of single quotes will disable the \t within them)
or ...??

thx for any help man!

tda 04-04-2003 03:11 AM

Re: tab delimiter
 
Quote:

Originally posted by codename000
i know that delimiter is set defualt as tab, but if i have to use a delimiter * followed by a tab for the command paste, what can i do??
in C, \t is used, but in shell script?

paste -d'*\t' doc1 doc2? (but the pair of single quotes will disable the \t within them)
or ...??

thx for any help man!

Can try this truck:

paste --delimiters="*`echo -e \t`"

codename000 04-04-2003 06:55 AM

um, didn't work man, but thx for the help.

moses 04-04-2003 10:18 AM

From what I can tall, the paste delimiter is limited to a single "character".
Try this:

Code:

paste doc1 doc2 | awk '{print $1"*""\t"$2}'


All times are GMT -5. The time now is 11:00 PM.