If I am doing several substitutions which need to be consecutive, e.g.
sed -i '/^[[:space:]]*browser.*\.should/s/browser/expect(browser/' t1_spec.rb sed -i '/expect(browser.*\.should/s/\.should/).should/' t1_spec.rb sed -i 's/\.should/\.to/' t1_spec.rb sed -i 's/==/eq/' t1_spec.rb
Is there a better way to do this that will only go through the t1_spec.file once and do the the 4 substitutions for each line rather than going through the file 4 times?