update exec.sh

This commit is contained in:
Nico Schottelius 2008-03-14 09:25:04 +01:00
parent f99223d9bb
commit 9a314d370e

View file

@ -1,15 +1,18 @@
#!/bin/sh #!/bin/sh
host="home.schottelius.org" host="home.schottelius.org"
host=""
set -x
pcmd() pcmd()
{ {
echo "$#", "$@"
if [ "$host" ]; then if [ "$host" ]; then
ssh "$host" "$@" ssh "$host" "$@"
else else
"$@" $@
fi fi
} }
pcmd ls / #pcmd ls /
pcmd cd /; ls "/is not there" #pcmd cd /; ls "/is not there"
pcmd cd / && ls