Regular expression, find and replace using Unix tools