![]() |
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 |
| Append text at end of the first line in a file | catgovind | Shell Programming and Scripting | 7 | 05-01-2008 07:33 AM |
| How to Append a Value to each line of the file | dsshishya | UNIX for Dummies Questions & Answers | 11 | 03-21-2008 02:48 PM |
| Append Line From a File To Another File | panknil | Shell Programming and Scripting | 3 | 05-29-2007 01:15 AM |
| Append a field to the end of each line of a file based on searching another file. | ultimate | Shell Programming and Scripting | 2 | 03-29-2005 10:21 AM |
| Large file need to append to each line | r1500 | UNIX for Dummies Questions & Answers | 1 | 10-14-2003 10:48 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Append to end of each line of file without a temp file.
Hello I am trying to append an incrimenting number to the end of each line I have it working with a temp file. But I want to do this without a temp file.
Code:
a=1
cat "file" | while read LINE
do
echo "$LINE, $a" >> filewithnumbers
a=`expr $a + 1`
done
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|