ccollect/test/exec.sh

19 lines
213 B
Bash
Raw Normal View History

2008-03-14 05:48:33 +00:00
#!/bin/sh
host="home.schottelius.org"
2008-03-14 08:25:04 +00:00
host=""
set -x
2008-03-14 05:48:33 +00:00
pcmd()
{
2008-03-14 08:25:04 +00:00
echo "$#", "$@"
2008-03-14 05:48:33 +00:00
if [ "$host" ]; then
ssh "$host" "$@"
else
2008-03-14 08:25:04 +00:00
$@
2008-03-14 05:48:33 +00:00
fi
}
2008-03-14 08:25:04 +00:00
#pcmd ls /
#pcmd cd /; ls "/is not there"
pcmd cd / && ls