![]() |
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 |
| 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 |
| how to add files to an existing tar file - HP-UNIX | Nomaad | UNIX for Dummies Questions & Answers | 5 | 11-06-2008 05:27 AM |
| existing file to a fixed length file | cmanand | Shell Programming and Scripting | 3 | 01-25-2008 05:50 PM |
| Creating a csv file based on Existing file | skywayterrace | Shell Programming and Scripting | 3 | 12-02-2007 09:19 AM |
| i want to delete a file based on existing file in a directory | srivsn | Shell Programming and Scripting | 3 | 04-11-2006 04:38 AM |
| Print one line of Existing File | danhodges99 | UNIX for Dummies Questions & Answers | 2 | 02-25-2003 11:56 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
I have a text file that has over 300 lines that I need to paste identical data to. What is the easiest way to do this? For example if I have a file that has lines of text xxxxxxxx and I would like to change each line to look like this "display text(xxxxxxxx)". What would be the easiest way to do this? Would I do something like
cat xxxxx.txt while read line do ? This is what I currently have: xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx This is what I want to change it to. display text(xxxxxxxx) display text(xxxxxxxx) display text(xxxxxxxx) display text(xxxxxxxx) display text(xxxxxxxx) Thanks, |
|
||||
|
And here is an awk solution:
awk '{print "display text (" $0 ")"}' xxxxx.txt > newfile.txt |
| Sponsored Links | ||
|
|