#!/bin/bash #A simple script to make it easier to start scripts on other computers #through ssh. #Copyright (C) 2004 Daniel Brewer #This program is free software; you can redistribute it and/or #modify it under the terms of the GNU General Public License #as published by the Free Software Foundation; either version 2 #of the License, or (at your option) any later version. #This program is distributed in the hope that it will be useful, #but WITHOUT ANY WARRANTY; without even the implied warranty of #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #GNU General Public License for more details. #http://www.gnu.org/copyleft/gpl.html if [ $# -ne 3 ] then echo "Usage: `basename $0` program-name directory computer" exit 1 fi prog="$1" dir="~/dan/$2" comp="$3" echo $prog $dir $comp ssh $comp "mkdir -p $dir" scp $prog $comp:$dir ssh $comp "nohup $dir/$prog >& $dir/$2.txt &"