how can i specify more than 1 consition in the following AWK statament??
i.e. if $2 is ABCD and $3 is MNOP and $4 is KLPM
similarly for OR
#!/bin/ksh
awk -F '[;]' ' $2 == "ABCD" { print $2, $3;}' file.xml
how can i specify more than 1 consition in the following AWK statament??
i.e. if $2 is ABCD and $3 is MNOP and $4 is KLPM
similarly for OR
#!/bin/ksh
awk -F '[;]' ' $2 == "ABCD" { print $2, $3;}' file.xml
Hi.
Something like:
awk -F ';' '($2 == "ABCD") && ($3 == "MNOP") && ($4 == "KLPM") { print $2, $3;}' file.xml
You could combine that to
awk -F ';' '$2 $3 $4 == "ABCDMNOPKLPM" { print $2, $3;}' file.xml
(if you wanted :D)
thanks