Computing.Net > Forums > Unix > identify a space record -Ksh

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

identify a space record -Ksh

Reply to Message Icon

Name: NM
Date: September 29, 2003 at 10:43:09 Pacific
OS: Soalris
CPU/Ram: Sparc
Comment:

I hv a file with following entry.

dn: uid=isgwpsadmin1, ou=adminaccount, o=xyz, dc=com
owner: uid=da87793,ou=account,o=xyz,dc=com
dn: uid=AdminPassword,ou=AdminAccount,o=xyz,dc=com
owner: uid=RMX8232, ou=account, o=xyz,dc=com

How do I identify a space before comma or after comma in the above records.
and if speace is their then display uid=xxxxxxx has a space.
(using korn shell script)



Sponsored Link
Ads by Google

Response Number 1
Name: Frank
Date: October 15, 2003 at 04:14:18 Pacific
Reply:

try,

grep ", " InFile | while read a uid rest
do
echo $uid has a space
done

hope it helps you

No RISK no fun
Frank


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: identify a space record -Ksh

Modifying a file in KSH www.computing.net/answers/unix/modifying-a-file-in-ksh/3456.html

Unix Script ignoring cmd line vars www.computing.net/answers/unix/unix-script-ignoring-cmd-line-vars/6193.html

Idendifying duplicate records www.computing.net/answers/unix/idendifying-duplicate-records/7141.html