|
Re: Replacing a pattern in one file by reading a string from anotherfile: msg#00024editors.sed.user
Kaushik wrote: > I found out another way(though quite lame , i admit) to do this > same thing :- > > paste 2 3 | sed 's/:/ /g' | awk '{print $3,":",$2}' > (Here we can always replace the awk part by the sed equivalent) > > File 2 contains : > > username:SAPextract > password:$$$$$ > Monthtoextract: October > > and File 3 contains : > > RunasUser: $username > RunasPsswd: $password > RunMonth: $Monthtoextract Yet another solution, which does the same thing: paste 3 2 | sed 's/:.*:/:/' This doesn't need to be so complicated. -- Eric Pement - eric.pement@xxxxxxxxx ------------------------ Yahoo! Groups Sponsor --------------------~--> Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life. http://us.click.yahoo.com/KIlPFB/vlQLAA/TtwFAA/dkFolB/TM --------------------------------------------------------------------~-> -- Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/sed-users/ <*> To unsubscribe from this group, send an email to: sed-users-unsubscribe@xxxxxxxxxxxxxxx <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | produce standard output from input file: 00024, shamrul ismawi |
|---|---|
| Next by Date: | Re: Simple Conditional execution in a script: 00024, hq00e |
| Previous by Thread: | sed users on frappri: 00024, Sven Guckes |
| Next by Thread: | Re: Replacing a pattern in one file by reading a string from anotherfile: 00024, hq00e |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |