scripting text replacement

bsd bsd at
Sat Nov 8 11:02:13 PST 2008

Sorry for this cross posting, but I can not find a good "bash" mailing  
I am certain FreeBSD gurus will provide me with a fast and reliable  
answer to this little question.

Here is the deal:

I have a file containing a list of items like that:

line1item1 line1item2 line1item3
line2item1 line2item2 line2item3
…400 times

I need to insert this into another text file using printf() items  
should be converted into variable looping… like that:

printf "Bla bla bla $1 bla bla $2 bla bla $3 bla bla $2"

The main thing is that I can not get $1 $2 $3 to correspond to  
line1item1 line1item2 line1item3

Any good idea or example will be welcome.

Gregober ---> PGP ID --> 0x1BA3C2FD
bsd @at@

P "Please consider your environmental responsibility before printing  
this e-mail"

More information about the freebsd-questions mailing list