Hey all,

Could you please check following way of writing awk is correct or not ???
-----------------------------------------------------------
Quote:
pattern= "mqsi[admtspr]"
cat tempgrep.txt | \
while read ppid
do
awk '{
recurcive_fun(ppid, pattern)
function recurcive_fun(n, pattern)
{
awk '{ if ($2~n && $1~pattern){
n=$3
recurcive_fun(n, pattern)}
else{
if ($2~n && $1!~pattern){
print $1 >> "tempmail.txt"
break
}
else {next}
}
}' tempfind.txt
}
}'
done
|
-----------------------------------------------------------------
Its recursion being called.
tempgrep.txt has :
462948
1311040
880922
tempfind.txt has :
t2589vg 880922 462948 09:57:07 -ksh
mqsiadm 1298856 1311040 09:57:56 -ksh
mqsiadm 1311040 880922 09:57:19 -ksh
Please suggust/correct the script(if wrong) !!
Thanks
Varun
