I still wonder why `cd` doesn't have a form `cd dir command...`, as in `cd dir tar xf -`.
#!/bin/sh
cd $1
shift
exec "$@"
It's a shame "in" is a reserved word, because that'd be a good name for it. Maybe "cde" for "cd-exec": tar c files | ssh dest cde /some/dir tar x