#!/bin/tcsh # Usage: ren arg1 arg2 # changes the string arg1 in the names of files # in the working directory into the string arg2 if ($#argv != 2) goto usage foreach i ( *$1* ) mv $i `echo $i | sed -n s/$1/$2/p` end exit 0 usage: echo "Usage: ren arg1 arg2" exit 1