Ugh. Nevermind. These address books have no rhyme or reason. It seems sometimes the 'mail' field comes AFTER the creatorsName field...which would make this pretty much impossible to search, whether you go bottom to top or vice versa.
Thanks for the scripts anyways....they helped give me a...
That seemed to work... but sometimes it puts the 'mail:' field on the line below. I have no idea why just this field would get thrown down into a new line.
Thanks CaKiwi, but I guess I could have saved you some trouble by posting a snip of the actual file I need to parse - I apologize. I figured I could take what you gave me and make the necessary changes, but I'm too new to this.
Here's what the file would have:
cn: bob
mail: bob@domain.com...
Ok, heres a sample file that I need to make a script for:
a
b
c
d
creatorsname = bob
a
b
c
d
e
f
creatorsname = bob
a
b
c
d
creatorsname = bill
a
b
c
d
e
f
g
creatorsname = bob
a
b
c
d
e
creatorsname = jack
What I need to do is pull out every field 'a','b','c' and 'd, but only for certain...
Hey,
I JUST started learning bash scripting and I'm having a bit of trouble. I'm trying to write a simple if-then loop that simply asks a question like 'Do you like pie?' and only accepts a 'yes' answer.
...so if you chose 'yes', it'd echo something like "good" and be done. If you chose...
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.