logo       

Re: can sed take take several line to produce multiple output: msg#00036

editors.sed.user

Subject: Re: can sed take take several line to produce multiple output

how to check the sed version?..

[root#:/opt/audit]# sed -V
sed: illegal option -- V
[root#:/opt/audit]# sed -v
sed: illegal option -- v
[root#:/opt/audit]# sed --version
sed: illegal option -- -
[root#:/opt/audit]# sed -h
sed: illegal option -- h
[root#:/opt/audit]# sed -help
sed: illegal option -- h
[root#:/opt/audit]# uname -a
SunOS muah2x.homelinux.com 5.8 Generic_117350-26 sun4u
sparc SUNW,Ultra-60


--- Tim Chase <sed@xxxxxxxxxxxxx> wrote:

> > 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
>
>
>
>
>
>


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


------------------------ 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>
Google Custom Search

News | FAQ | advertise