#!/usr/local/plan9/bin/rc fn filter { sed -e 's/ (.*//' -e 's/ /%20/g' -e 's|/|%2f|g' -e 's/&/%26/g' } while (o=`{read}) { author = `{echo $o | sed -e 's/,.*//' | filter} title = `{echo $o | sed -e 's/[^,]*, //' | filter} # inauthor:Epp+intitle:Discrete%20Mathematics echo inauthor:$author+intitle:$title }