- # line=${line#$'\E[00m'}
- # when no argument is given to ls, the first line is like "total 123M". strip that
- if $first && [[ ! $@ ]]; then
- first=false
- else
+ #line=${line#$'\E[00m'}
+ # lines like "total 123M", we don't want
+ if [[ ! $line =~ ^total\ [0-9][^\ ]*$ ]]; then