count drives by type, ignoring serial number
[sysadmin-cookbook] / bin / cook.sh
index ab1c665..c224310 100755 (executable)
@@ -6,5 +6,10 @@ test -e $1 || ( echo "usage: $0 recepises/something"; exit )
 
 cat $1
 
-grep '[a-z]*@[a-z]*:[^$#]*[$#]' $1 | cut -d\# -f 2 | xargs -i sh -x -c "{}"
+ssh=''
+if [ ! -z $2 ] ; then
+       ssh="ssh $2"
+fi
+
+grep '[a-z]*@[a-z]*:[^$#]*[$#]' $1 | cut -d\# -f 2 | $ssh xargs -i sh -x -c "{}"