Quote:
Originally Posted by esham
Hi Tanku..
Can u explain the usage
dont know the swiches -e:a -e
then ta
P;D
please help
thanks in advance
esham
i stole it from
handy one-liners for sed. the problem was similar to the example of a line that begins with an equal sign (sed -e :a -e '$!N;s/\n=/ /;ta' -e 'P;D')
-e
cmd
Next argument is an editing command. Useful if multiple scripts or commands are specified.
:
label
Label branched to by t or b.
b
Branch to label or to end of script.
t
Same as b, but branch only after substitution.
P
Print first part (up to embedded newline) of multiline pattern space created by N command. Same as p if N has not been applied to a line.
D
Delete the first part (up to embedded newline) of multi-line pattern space created by N command and resume editing with first command in script. If this command empties the pattern space, a new line of input is read, as if the d command had been executed.
of course you can also read the friendly manual