![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to check Null values in a file column by column if columns are Not NULLs | Mandab | Shell Programming and Scripting | 7 | 03-15-2008 05:57 AM |
| Drop a Column from a File | Raamc | UNIX for Dummies Questions & Answers | 4 | 01-09-2008 06:36 AM |
| FILE:Adding new column | sandeep_hi | Shell Programming and Scripting | 2 | 06-09-2006 06:46 AM |
| cut the third column from a file | isingh786 | Shell Programming and Scripting | 8 | 12-29-2005 07:11 AM |
| Replace 10th column with a new column--- Terriblly hurry | ahmedwaseem2000 | Shell Programming and Scripting | 2 | 09-05-2005 10:10 PM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
To cut entire column from a file and apend it to another file as another column
file1.txt :
india pakistan bangladesh japan canada africa USA srilanka Nepal file2.txt Delhi Tokyo washington I have to cut the first column of file1.txt and apend it with file2.txt as another column like this Delhi india Tokyo japan washington USA Anyone one please say me the syntax for the above . Last edited by sakthifire; 04-22-2008 at 05:46 AM. |
| Forum Sponsor | ||
|
|
|
|||
|
It's Simple Buddy
Quote:
First Cut fhe first field of first file $ cut -d' ' -f1 <first filename> > tmpfirst $ cut -d' ' -f2 <second filename> > tmpsecond $ paste tmpfirst tmpsecond > newfile (-f1 means first field , -f2 means second field) |
|||
| Google UNIX.COM |