Bash Round
chang@ACPNEW:~/tmp$ echo "scale = 5; 5+50*3/20 + (19*2)/7" | bc -l | xargs printf "%2.3f\n"
17.929
Avg
chang@ACPNEW:~/tmp$ awk '{s+=$1}END{print "ave:",s/NR}' RS=" " avg.txt
ave: 54.646
for loop
for i in {1..50}
do
echo $i
done
chang@ACPNEW:~/tmp$ cat b.txt | tr -s " "
tab seperated
cut -d$'\t' -f2-
chang@ACPNEW:~/tmp$ cut -d$'\t' -f2- b.txt
chang@ACPNEW:~/tmp$ cut -d$'\t' -f2- b.txt