I am trying to print the output of a set of 100 input files
I want to generate two files
1. satisfying if condition
2. satisfying else condition
I am working in Bash . pls help me to solve this
for i in *.txt;
do awk '{if(($NF>70) && ($3>30)) {print $1,$2,$3,$NF'}
$i > output/$i.out;
else $i > not/$i;}
done;
i want to print output in to 'output' directory if it is satisfying if condition (($NF>70) && ($3>30))
and also i need an output file in 'not' directory as the result of else condition
While running this command its showing -bash: syntax error near unexpected token `else'
thanks
but its not working fine
If it's not working don't click 'accept' and tell us what the error is.