#!/bin/tcsh # Usage: rename 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