I am trying to replace multiple words in a file by using
sed -i #expression1 #expression2
Something 123 item1 Something 456 item2 Something 768 item3 Something 353 item4
anything 123 stuff1 anything 456 stuff2 anything 768 stuff3 anything 353 stuff4
I can get the following output by using
sed -i two times.
sed -i 's/Some/any/g' file sed -i 's/item/stuff/g' file
Can I have any possible way of making this as a single in-place command like
sed -i 's/Some/any/g' -i 's/item/stuff/g' file
When I tried the above code it takes
s/item/stuff/g as a file and tries working on it.