Revision 83 (by dpavlin, 2009/05/17 15:33:23) cook over ssh connection (add host as last argument)
#!/bin/sh

# small helper to cook the recepie (start prompt parts in shell)

test -e $1 || ( echo "usage: $0 recepises/something"; exit )

cat $1

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 "{}"