![]() |
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 |
| 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 09:57 AM |
| Drop a Column from a File | Raamc | UNIX for Dummies Questions & Answers | 4 | 01-09-2008 10:36 AM |
| FILE:Adding new column | sandeep_hi | Shell Programming and Scripting | 2 | 06-09-2006 09:46 AM |
| cut the third column from a file | isingh786 | Shell Programming and Scripting | 8 | 12-29-2005 11:11 AM |
| Replace 10th column with a new column--- Terriblly hurry | ahmedwaseem2000 | Shell Programming and Scripting | 2 | 09-06-2005 01:10 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | 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 08:46 AM.. |
|
||||
|
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) |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|