SUMMARY: sed script help3

From: pelicancomputers (rfransix@yahoo.com)
Date: Fri Sep 27 2002 - 12:30:39 EDT


thank you for your help. here's the best solution:

sed -e '/^dn:/ {
                 n
                 a\
         changetype: modify\
         replace: userpassword
                 }' < $1 > $2

--- pelicancomputers <rfransix@yahoo.com> wrote:
> good afternoon,
>
> i have the following sed scripts that places the two
> lines after every line that begins with dn:
>
> #!/bin/sh
> sed -e '/^dn:/a\
> changetype: modify\
> replace: userpassword' < $1 > $2
>
> a new problem arose that causes the dn: to be two
> lines long, so this scripts cuts the dn: line in
> half.
>
> how can i modify this script to jump a second
> carriage
> return and place the changetype: and replace: lines
> after that!?
>
> thank you very much!
> New DSL Internet Access from SBC & Yahoo!
> http://sbc.yahoo.com
> _______________________________________________
> sunmanagers mailing list
> sunmanagers@sunmanagers.org
>
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:25:02 EDT