![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum 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 |
| List to columns and awk help | baghera | Shell Programming and Scripting | 17 | 08-28-2007 05:20 AM |
| Row to Columns | vskr72 | UNIX for Dummies Questions & Answers | 4 | 03-21-2007 06:53 AM |
| How can I use columns with a command? | chrchcol | Shell Programming and Scripting | 0 | 07-24-2006 04:51 PM |
| re arrange the columns | ahmedwaseem2000 | Shell Programming and Scripting | 0 | 09-22-2005 11:51 PM |
| adding columns | Kelam_Magnus | Shell Programming and Scripting | 9 | 01-25-2002 07:35 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
hi everybody:
My question is how could i add a new columns to a file that it has one column like this: 06/06/2005 06/07/2005 06/08/2005 06/09/2005 06/10/2005 06/11/2005 06/12/2005 06/13/2005 06/14/2005 06/15/2005 06/16/2005 06/17/2005 .... And i want add columns like : 06/06/2005 file1 file2 file3 ..... 06/07/2005 file1 file2 file3 ..... 06/08/2005 file1 file2 file3 ..... 06/09/2005 file1 file2 file3 ..... 06/10/2005 file1 file2 file3 ..... 06/11/2005 file1 file2 file3 ..... 06/12/2005 ................ 06/13/2005 ................ 06/14/2005 ................ 06/15/2005 ................ 06/16/2005 ................ 06/17/2005 ................ ...... ................ with awk. Thanks in advance |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
nawk '{print $0, "file1 file2 file3"}' myFile
|
|
#3
|
|||
|
|||
|
when i put file1, this mean that this field comes from other file, and file2 from other.
i want add columns, and these new columns come from other file. thanks |
|
#4
|
||||
|
||||
|
look into 'man paste'
|
|
#5
|
|||
|
|||
|
You can use getline utility with awk program as,
awk '{ getline ln < "file1"; print ln" "$0 }' file hth. |
|||
| Google The UNIX and Linux Forums |