I agree with pan64. Using a simple command is far simpler. In addition, to avoid the
quotes headache you might run the df command remotely and parse it locally, e.g.
Code:
#!/bin/sh
for i in something
do
df=`ssh $i "df -Pl"`
echo "$df" | awk '/^\/dev/{sub(/%/,"",$5); if ($5 > 90) print $5, $6}'
done
adding something to identify the server from which you get some result.
Moreover, notice that usually you don't need to run grep, awk and sed together, since awk can do it all!
