The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 12-13-2001
darthur darthur is offline
Registered User
  
 

Join Date: Dec 2001
Location: Overland Patrk
Posts: 62
Question pasting text into an existing file

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,