#!/usr/local/plan9/bin/rc for (i in *csv) { out=`{echo $i | sed -e 's/inauthor://' -e 's/%20/ /g' -e 's/.intitle:/, /g'} mv $i $"out }