I don't know how to do this with
awk
But my target is to create awk one line syntax in order to print the
second field ($2) if
all first field ($1) are true
for
example
I have the
file:
true
my_name_is_lenon
true my_name_is_lenon
true
my_name_is_lenon
false my_name_is_lenon
true
my_name_is_lenon
false my_dog_is_fat
true
my_dog_is_fat
true my_dog_is_fat
true
I_am_very_tall
true I_am_very_tall
true
I_am_very_tall
true my_ball_is_fine
true
my_ball_is_fine
the
awk will print only the
following:
I_am_very_tall
my_ball_is_fine
Because
I_am_very_tall , my_ball_is_fine get true on the first field without
false
my_dog_is_fat ,
my_name_is_lenon not printed because the false word on the first
field
The rule is to print the second field if
no false word on the first field! (Of all the same sentence on the second
field)
lidia
No comments:
Post a Comment