1

Bash script to do *something* when a file falls in one of three categories

view story
linux-howto

http://ubuntuforums.org – Heh, working on a bash script to chop up a file based on its filesize. As a test I wrote this bash shortie just to see if I can do the test accurately: Code: #!/bin/bash for i in *.BIN; do if        [[ 'stat --printf="%s" "$i"' > 71680 ]]     then    echo "$i is Large" elif    [[ "$size" > 34816 ]]     then    echo "$i is Medium"     else    echo "$i is Small" fi done Unfortuneatly, even though my naked eye and ll tels me that the fil (Hardware)