You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#!/bin/bash
|
|
uniq_colors=$( awk -F';' '!seen[$5]++ {if($5!="color")print($5)}' test.txt )
|
|
for i in $uniq_colors
|
|
do
|
|
COUNT=1
|
|
awk -v s=$i -v COUNT=$COUNT -F';' '{ if ($5==s) {{ COUNT++ } if (COUNT%2==1) {var1=sin($4)/cos($4); printf($2"\t"); printf("%.4f\n",var1)} } }' test.txt
|
|
done
|
|
|