1#!/bin/tcsh 2 3set files = `echo "$*" | cut -d" " -f1 --complement` 4if ( $# < 2 ) then 5 echo "$#" 6 echo "Process a sed expression onto a set of files" 7 echo "call me fix_l10n.sh <sed expression> <file>" 8 echo "e.g. fix_l10n.sh s/test/ivo/g *.sdf" 9 echo "or fix_l10n.sh 's/abc<ctrl+v+tab>/abcx<ctrl+v+tab/'" 10 exit( -1 ) 11endif 12 13foreach file ( $files ) 14 echo "Processing $1 on file $file" 15 cat $file | sed -e "$1" > $file.tmp 16 mv $file.tmp $file 17end 18