![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | 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 !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Adding columns of two files | chandra321 | Shell Programming and Scripting | 7 | 05-06-2009 01:11 PM |
| adding columns | Kelam_Magnus | Shell Programming and Scripting | 12 | 02-10-2009 10:56 AM |
| comparing files - adding/subtracting/formating columns | oabdalla | Shell Programming and Scripting | 7 | 06-13-2008 04:20 AM |
| Perl: adding columns in CSV file with information in each | dolo21taf | Shell Programming and Scripting | 1 | 03-05-2008 02:52 AM |
| Adding columns to excel files using Perl | dolo21taf | Shell Programming and Scripting | 1 | 02-20-2008 07:13 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Adding columns to a file
I want to select the first column from a daily file called foo.csv. The result is written to file foo.txt. Currently the following script is used for that:
cut -d, -f 1 foo.csv > foo.txt A typical result would yield : A12 A45 B11 B67 What needs to happen in addition is that two columns need to be added before writing to file, namely a code (say 'abc') and the current date, such that a typical result would yield : abc 2008-05-20 A12 abc 2008-05-20 A45 abc 2008-05-20 B11 abc 2008-05-20 B67 How can this be achieved in particular if the date (column 2) should be today's date? Last edited by figaro; 05-16-2008 at 05:37 PM.. Reason: Simplification of problem |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|