![]() |
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 grep / zgrep to output ONLY the matching filename and line number? | vvaidyan | UNIX for Dummies Questions & Answers | 3 | 03-12-2008 05:33 PM |
| Accepting filename as command line param and writing to it | silas.john | Shell Programming and Scripting | 9 | 02-06-2008 09:26 AM |
| Get Filename and Line Number using grep | ceemh3 | UNIX for Dummies Questions & Answers | 4 | 09-17-2007 11:35 AM |
| Grabing Date from filename and adding to the end of each line in the file. | rkumar28 | Shell Programming and Scripting | 1 | 05-01-2007 09:25 PM |
| help on deleting file/filename | apalex | UNIX for Dummies Questions & Answers | 4 | 06-27-2001 10:31 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
How to add filename to the end of each line in file
Hi,
I'm reading data from comma separated files to DB. Now there is a need to have the name of the input file in each row of that file. How can I do this in unix script? Example: $cat file1 value11,value12, value,13 value21,value22, value,23 value31,value32, value,33 And the result should be: $cat file1 value11,value12, value,13,file1 value21,value22, value,23,file1 value31,value32, value,33,file1 Thanks in advance, -M- |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|