![]() |
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 |
| Shell scripting adding text to top of file | meadhere | UNIX for Dummies Questions & Answers | 7 | 07-05-2007 09:31 AM |
| adding a line to a file | andy2000 | Shell Programming and Scripting | 2 | 03-26-2007 08:44 AM |
| adding text to a file between lines | bishweshwar | Shell Programming and Scripting | 7 | 10-10-2006 01:03 PM |
| Adding Text To each line of a file | cubs0729 | Shell Programming and Scripting | 4 | 09-08-2005 04:40 PM |
| Changing the column for a row in a text file and adding another row | aYankeeFan | Shell Programming and Scripting | 9 | 05-02-2005 09:42 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
adding text to end of each line in a file
I'm needing to add a "hour:min" to the end of each line in a document. The document in this case is only going to be one line.
if this inserts it at the end, what needs to be changed to add something at the end... /bin/echo "%s/^/$filler/g\nwq!" | ex -s $oFile Thank you... |
|
||||
|
Try
sed -e 's/$/hour:min/' InFile >OutFile I have not worked with ex, but it looks like you meant that it was adding in the beginning, not in the end, to add in the end use the same construction "s/$/MyString". And I do not know what '!' is doing. Good luck. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|