#!/bin/csh # Usage: "indir # Moves to the specified directory, executes the command, and moves back. # The "move back" is really unnecessary, since a shell script executes in # a subprocess and so "cd" commands in it don't affect the parent process. set current=`pwd` cd $1 shift $* cd $current pwd