Re: Shell script help
From: Parv (parv_at_pair.com)
Date: 07/30/05
- Previous message: Paul Schmehl: "Shell script help"
- In reply to: Paul Schmehl: "Shell script help"
- Next in thread: Parv: "Re: Shell script help"
- Reply: Parv: "Re: Shell script help"
- Reply: Paul Schmehl: "Re: Shell script help"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 30 Jul 2005 02:57:57 -0400 To: Paul Schmehl <pauls@utdallas.edu>
in message <E9E44D6085C02C80E233D138@Paul-Schmehls-Computer.local>,
wrote Paul Schmehl thusly...
>
> Running what I *thought* was the same sed command in the Makefile
> of the port doesn't solve the problem of the formatting of the man
> pages, but it doesn't generate any errors either:
>
> @${SED} -e '/man\.macros/r man.macros' -e '/man\.macros/d'
> ${WRKSRC}/doc/${f} \
> > ${WRKDIR}/${f}
>
> Can someone explain what the sed command is doing? The man page
> isn't much help.
In the 1st part, sed sends the output of file 'man.macros' to
standard out if it exists (otherwise no worries) when sed sees the
'man\.macros' pattern.
And the 2d part, just deletes that pattern.
There in the sed(1) man page all is. Or, line by line try this ...
rm -f q ; echo polka > p
{ echo p ; echo q; echo p; } | sed -e '/p/r p' -e '/p/d'
{ echo p ; echo q; echo p; } | sed -e '/p/r q' -e '/p/d'
- Parv
-- _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
- Previous message: Paul Schmehl: "Shell script help"
- In reply to: Paul Schmehl: "Shell script help"
- Next in thread: Parv: "Re: Shell script help"
- Reply: Parv: "Re: Shell script help"
- Reply: Paul Schmehl: "Re: Shell script help"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- Re: Shell script help
... > wrote Paul Schmehl thusly... ... >> of the port doesn't solve the
problem of the formatting of the man ... >> Can someone explain what the sed command
is doing? ... just deletes that pattern. ... (freebsd-questions) - Re: Curious About Traffic
... possible your filter is inadvertently obscuring packets from your view. ...
> out to this address at all, and the pattern recurs evey minute or so. ... port
numbers as "back doors". ... all, would indicate either nothing listening on the port,
or something ... (comp.security.firewalls) - Re: What is the Pattern here ?
... they are all Zombies by the reaction I get when I probe back at them. ... Could
this Pattern I'm seeing be those very Zombied Servers with low TTL's? ... I'm on Dialup
and may explain why I'm being hit by these Dialup Zombies ... The Rules are just Labels so I may
look up more than just the port #. ... (comp.security.firewalls) - Re: Selection.Cells vs Range reference - strange behaviour (using
... that rely on first selecting cells to remove the selection part. ... I have
a series of subs for formatting text along the lines of the example ... .Pattern
= xlSolid ... (microsoft.public.excel.programming) - Re: regexp again :( i am about to explode.....
... so that we know how to ask tcl to do the right thing. ... characters are "port"?
... If you really only are worrying, in Pattern, about the _first_ ... If you are
determined to use lsearch, then first do a split on $Str, ... (comp.lang.tcl)