perl -p -e 's/yourstring/yournewstring/g' inputfile > outputfile