|
Re: can sed take take several line to produce multiple output: msg#00035editors.sed.user
> your script is working but produce in 1 line... > the \n doesn't work! sed 'N;s/.*- \([^,]*\), \(.*\)\(\n\)[^,]*,\([^,]*\),\([^,]*\),\([^,]*\),\([^,]*\), \(.*\)/\2, Name=\4 2name=\5 phone=\6 phone2=\7\3>From : \8 Access=\1/' might do the trick. If it is parsing it correctly, but not putting the resulting \n in the output, something's kinda weird. However, since it seems to be able to parse the \n, there's no reason you shouldn't be able to capture it and regurgitate it later (as \3) where you want the \n as long as you bump up the number of each of the following fields. What version of sed are you running? -tim ------------------------ Yahoo! Groups Sponsor --------------------~--> Most low income households are not online. Help bridge the digital divide today! http://us.click.yahoo.com/I258zB/QnQLAA/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: | Re: can sed take take several line to produce multiple output: 00035, shamrul ismawi |
|---|---|
| Next by Date: | Re: can sed take take several line to produce multiple output: 00035, shamrul ismawi |
| Previous by Thread: | Re: can sed take take several line to produce multiple outputi: 00035, shamrul ismawi |
| Next by Thread: | Re: can sed take take several line to produce multiple output: 00035, shamrul ismawi |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |