Hi,
I am newbie in shell programming and I need some help.
I had some data and I format it in a file like
dn: uid=aaaaa, dc=exmple, dc=com
cn: bbbb cccc
sn: cccc
telephoneNumber:+30-6543-123456
I have to extract the information aaaaa , bbbb, cccc and the phone number
using awk expressions
I am trying regular expressions like
awk '/dn: uid=[a-zA-Z]/ { print }' 1.txt
but the output is the whole line (not only the username)
can I save this info to arrays like usernames[] , firstnames[], lastnames[]
because I want to do something else later.
Thanks a lot for your help