![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| split files into specified number of output files | Migrainegirl | UNIX for Dummies Questions & Answers | 4 | 05-13-2008 09:38 AM |
| paste several files | tonet | Shell Programming and Scripting | 1 | 10-05-2007 10:08 AM |
| paste 2 files ( it is possible???) | mig28mx | UNIX for Dummies Questions & Answers | 3 | 06-21-2007 11:51 AM |
| Paste the files contents differently | er_aparna | Shell Programming and Scripting | 1 | 05-16-2007 04:29 AM |
| How to output the difference of two files? | yxiao | UNIX for Dummies Questions & Answers | 4 | 01-26-2004 01:55 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Need a Help with paste 2 files since the output is not what i want ie: i have 2 files
pwd /home/pavargaz/alejo/scan01/nokia/2006/abril/bavaria/chu0 $ cat filechu chu0 dia Cantidad 01 257 02 262 03 260 04 58 $pwd /home/pavargaz/alejo/scan01/nokia/2006/abril/bavaria/chu1 $ cat filechu chu1 dia Cantidad 01 257 02 262 03 260 04 283 05 253 06 122 The problem is when i merge these 2 files the output is not what i want sice the content of file1 is not alignned $ paste -d"\t\n" `cat file0 file1` chu0 chu1 dia Cantidad dia Cantidad 01 257 01 257 02 262 02 262 03 260 03 260 04 58 04 283 05 253 06 122 $the output should be dia Cantidad dia Cantidad 01 257 01 257 02 262 02 262 03 260 03 260 04 58 04 283 05 253 06 122 |
|
||||
|
i run this commad, so the output is displayed:
paste ./chu0/filechu ./chu1/filechu chu0 chu1 dia Cantidad dia Cantidad 01 257 01 257 02 262 02 262 03 260 03 260 04 58 04 283 05 253 06 122 The rows 5 and 6 are not aligned, they must be aligned right to file ./file1/filechu, because the content of ./chu1/filechu is: chu1 dia Cantidad 01 257 02 262 03 260 04 283 05 253 06 122 Hpoe your help. Thanks |
|
||||
|
I am using bash oriented shell in suse.I tried out your scenarion and is seems to be working as you intend.i tried the command
`paste filechu1 filechu2` inwhich filechu1 & filechu2 are text files with the same contents as you posted.I got the output as aligned.So pls let me know your environment. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|