## TITLE: SSH TO REMOTE SERVER AND REPORT DRIVE SPACE AVAILABLE ## OS: MAC 0S 10.6.X ## LAST DOC MODIFY: 2011-11-10 #!/bin/bash # CONFIG HERE tgt_userhost="USERNAME@10.0.1.100" tgt_drv="/Volumes/harddrive_name/" # END CONFIG HERE find_space="df $tgt_drv | grep % | awk '{ print \$5 }' | sed s/%//" tgt_space=`ssh "$tgt_userhost" "$find_space"` echo "" echo $tgt_space echo "" __________________________________________________________________________________________ Copyright 2000-2011 Dylan Schneider. All Rights Reserved. This document uses unix line breaks(LF). Text on macnode.com is for example only, not as actual working instructions. Text on macnode.com should only be used as a guide, and only by advanced it professionals.