[CentOS] script help
John Doe
jdmls at yahoo.comThu Jun 18 09:34:14 UTC 2009
- Previous message: [CentOS] script help
- Next message: [CentOS] script help
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: chloe K <chloekcy2000 at yahoo.ca> > I have a file. list.txt (two columns) > > column1 column2 > name address > > I need to put in the letter file letter.txt eg: > > Dear: Chloe > Address: CA > > Can I use this > > for i `cat list.txt` | sed 's/Chloe/$i.1; /CA/$i.2/g' $i.letter.txt For single words space separated: cat list.txt | while read LINE do set $LINE printf "Dear: %s\nAddress: %s\n" $1 $2 >> $1.letter.txt done JD
- Previous message: [CentOS] script help
- Next message: [CentOS] script help
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list