on 2013-12-05 22:09 LuKreme wrote

On 05 Dec 2013, at 13:32 , steve harley <st...@paper-ape.com> wrote:

ls -l /var/vm/swapfile* | awk '{ foo+= $5 } END { printf "swap is %2.1f MB", 
foo/1024^3 }'

1024^3 is GB.

yup - i think a few years ago i did a hasty edit; it was originally 1024^2, but i wanted fewer digits

what puzzles me is why the awk loop doesn't work when i issue the above command directly in the shell - works fine as a script file


_______________________________________________
MacOSX-talk mailing list
MacOSX-talk@omnigroup.com
http://www.omnigroup.com/mailman/listinfo/macosx-talk

Reply via email to