on 2013-12-05 22:09 LuKreme wrote
On 05 Dec 2013, at 13:32 , steve harley <[email protected]> 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 [email protected] http://www.omnigroup.com/mailman/listinfo/macosx-talk
