BashScripting icon indicating copy to clipboard operation
BashScripting copied to clipboard

Remove useless condition.

Open immaroot opened this issue 3 years ago • 0 comments

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

immaroot avatar Jan 23 '22 01:01 immaroot