Range for filesize in ls -l
I am trying to display the files whos sizes are in a specific range. This script will take two arguments as the lower bound and upper bound of the file size, and prints out a list of filenames and their sizes. I tried this:
for i in {$0..$1}
do
set -- $(ls -l "$i")
echo $i: $5 bytes
done
I'm pretty sure I'm implementing the range incorrectly, but I don't know how to make it work. Any suggestions?
|