#!/bin/rc from=$1 to=$2 charconst='''[^'']*''' strconst='"([^"]|\\")*"' name='[a-zA-Z_][a-zA-Z_0-9]*' partial=`{echo -n $from | awk '{for(i = 0; i < length($1) + 1; i++) printf "."}'} echo 'y/'$charconst'/ y/'$strconst'/ x/'$name'/ g/'$from'/ v/'$partial'/ c/'$to