All,
I have a text file looks similar below:
DN: cn=user1,ou=admin,o=abc
changetype: add
l: loc1
HomeDirectory: FS1_vol0,ou=servers,o=abc
DN: cn=user2,ou=is,o=abc
l: loc2
messageserver: fs2
homedirectory: FS2_vol0,ou=servers,o=abc
.
.
.
I wanted to use awk to do this:
DN: same as below
changetype: add
replace: l (print this line new line)
l: loc1
- (print this dash)
replace: homedirectory (print this line)
homedirectory: FS1_vol0,ou=servers,o=abc
DN: cn=user2,ou=is,o=abc
changetype: add
replace: l ( print this line)
l: loc2
- (print this dash)
replace: messageserver (print this line)
messageserver: fs2
- (print this dash)
replace: homedirectory ( print this line)
homedirectory: FS2_vol0,ou=servers,o=abc
Thanks,
SP
I have a text file looks similar below:
DN: cn=user1,ou=admin,o=abc
changetype: add
l: loc1
HomeDirectory: FS1_vol0,ou=servers,o=abc
DN: cn=user2,ou=is,o=abc
l: loc2
messageserver: fs2
homedirectory: FS2_vol0,ou=servers,o=abc
.
.
.
I wanted to use awk to do this:
DN: same as below
changetype: add
replace: l (print this line new line)
l: loc1
- (print this dash)
replace: homedirectory (print this line)
homedirectory: FS1_vol0,ou=servers,o=abc
DN: cn=user2,ou=is,o=abc
changetype: add
replace: l ( print this line)
l: loc2
- (print this dash)
replace: messageserver (print this line)
messageserver: fs2
- (print this dash)
replace: homedirectory ( print this line)
homedirectory: FS2_vol0,ou=servers,o=abc
Thanks,
SP