Here is a simple csh-script, which renames its *.c args to *.o files: #! /bin/csh if ($#argv) then foreach from ($*) set renew = `echo $from:r` echo moving $from to $renew.o mv $from $renew.o end exit 0 endif # Didn't exit safely cat <<EOF `clear` Syntax: $0 from_1.c from_2.c to_1.o to_2.o ... EOF