4 ms·
You could quite easily write a script that does this: #!/bin/sh cd $1 shift exec "$@" It's a shame "in" is a reserved word, because that'd be
by efaref 9y ago
You could quite easily write a script that does this:
#!/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
- apk17 9y agoMine is called cdx and includes 'env' functionality and a bit more. (https://github.com/apk/c-utils/blob/master/aenv.c https://github.com/apk/c-utils/blob/master/aenv.c)