Hi,
I have a text file that looks like this:
abcbs,adbsd,,,,,,
adsdfd,afdsf,,,,,,
adfsd13,1232dfsfe,,,,,,
And I want to insert a string after the second comma that looks like this:
abcbs,adbsd,string,,,,,
adsdfd,afdsf,string,,,,,
adfsd13,1232dfsfe,string,,,,,
Thanks,
SP
All,
I need help adding newline using awk and this is what I have for the input file:
DN: user1,ou=testing,o=abc
Changetype: modify
l: loca
DN: user2,ou=testing,o=abc
Changetype: modify
l" locb
I ran this command and it did not work.
awk '{print}/^Changetype:/{print "Delete: l"'...
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...
I query the ldap server using the following command and noticed certain attributes that are longer than 80+ column end up wrap-around the next with a space indent. For example:
ndshomedirectory: fs1_vol0,ou=servers,o=amc#0#users/test
user1
Is there an option to prevent this or it is the...
All,
I tried to query the home directory in eDirectory and it did not work for me. Does anyone out did it with sucess?
ldapsearch -h ldapserver -D cn=admin,o=amc -w password -b o=amc "(&(objectclass=user)(ndshomedirectory=fs1_vol0,ou=servers,o=amc))" dn ndshomedirectory
Please advice,
SP
All,
I am new with AWK and want to learn how to manipulate a text file.
Here how the text file looks like before:
Name: XXX
Address: yyy
City: ZZZ
Name: AAA
Address: BBB
City: CCC
And it is how it looks like after:
Name: XXX Address: YYY City: ZZZ
Name: AAA Address: BBB Citry: CCC...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.