[K12OSN] Help with sed script!
Timothy Legge
timlegge at gmail.com
Fri Aug 10 02:27:08 UTC 2007
On 8/9/07, Timothy Legge <timlegge at gmail.com> wrote:
> sed -n '
> # print line and branch to end only for non matching lines
> /DC=LO/!{p;b}
> # remove trailing spaces
> s/ *$//
> # store the current line
> h
> # read next line destroying current line
> n
> # remove reading spaces
> s/^ *//
> # swap the current line and stored line
> x
> # append the new stored line to the current line
> G
> # remove embedded new line
> s/\n//p
> ' $2
replace the $2 with $1 my command line originally included the DC=LO string...
Tim
More information about the K12OSN
mailing list