BashScripting
BashScripting copied to clipboard
Remove useless condition.
On line 7 of burplist.sh we have:
awk ' {print;} NR % 1 == 0 { print "peter"; }' burplist.txt > burplistpeter.txt
The condition NR % 1 == 0 will always be true. Any integer modulo 1 always gives a 0 remainder.
I suggest replacing it with either:
awk '{print $1; print "peter"}' burplist.txt > burplistpeter.txt
or
awk '{print; print "peter"}' burplist.txt > burplistpeter.txt