# this should be used as standard input to the shell exec 4<&0 cd /tmp command pwd exec 4<&-