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 names (every a,b,c and d field that has a creatorsname = to 'bob', then format the output into different fields so it could be converted to a .csv file - i.e.:
a b c d
a b c d
a b c d
I'm totally new to awk so I don't really know how to go about it. Also, the name comes AFTER the fields a,b,c and d that it pertains to, so would it have to do the search starting from the bottom of the file?
Thanks in advance...
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 names (every a,b,c and d field that has a creatorsname = to 'bob', then format the output into different fields so it could be converted to a .csv file - i.e.:
a b c d
a b c d
a b c d
I'm totally new to awk so I don't really know how to go about it. Also, the name comes AFTER the fields a,b,c and d that it pertains to, so would it have to do the search starting from the bottom of the file?
Thanks in advance...