Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'bash function' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
bash function
Authored by: lullabud on May 17, '11 09:00:06AM
Here's a bash function to do pretty much the same:
function open {
biggest=$(stat -f%z "$@" | sort -n | tail -n 1)
if [ "$biggest" -gt "$size_limit" ] ; then
   echo "One of the files is too big" 1>&2
   /usr/bin/open "$@"
Edited on May 17, '11 09:08:29AM by lullabud

[ Reply to This | # ]