|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
appending a command to print a file in a comma delimited format
Hi everyone, i have a file that I had grep'd from something else lets call it file1.txt which consists variable files and lines due to different scenarios/inputs Code:
1782 9182 fe35 ac67 how can I print this in this manner? Code:
1782,9182,fe35,ac67 also if i had piped the new output to a file say file2.txt, how can i call file2.txt using printf? please help. thanks a lot. |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
Have a look at the man page for
paste .
|
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
Try like.. Code:
paste -d , -s test1.txt |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Print records which do not have expected number of fields in a comma delimited file | machomaddy | Shell Programming and Scripting | 7 | 01-31-2012 08:27 AM |
| Remote command output to file comma delimited | markdjones82 | Shell Programming and Scripting | 0 | 06-10-2010 09:57 AM |
| Urgent! need help! how to convert this file into comma delimited format | natalie23 | UNIX for Advanced & Expert Users | 2 | 08-28-2009 04:39 AM |
| how to convert this file into comma delimited format | natalie23 | Shell Programming and Scripting | 1 | 08-28-2009 04:25 AM |
| Converting Tab delimited file to Comma delimited file in Unix | charan81 | Shell Programming and Scripting | 22 | 01-20-2006 08:24 AM |
|
|