Another hiccup in a script included in Wicked Cool Shell Scripts, one that’s a subtle problem because it sometimes occurs because of a user-set LS_OPTIONS flag. Script #37, bestcompress, has the following sequence:
smallest="$(ls -l "$name" $Zout $gzout $bzout | \
awk '{print $5"="NR}' | sort -n | cut -d= -f2 | head -1)"