First of all, “smh my head” doesn’t make any sense. The SMH is an initialism and should therefore be capitalized. The “my head” afterwards evaluates to “Shaking My Head My Head,” so that part should be removed. The comma after should be changed to a period since “Shaking My Head” is a sentence. The second comma should also be changed to a period. “Youngsters these days with their avocado toast and their gig economies,” is a sentence in and of itself, as is everything after said comma. Also, a period should be added to the end of the last sentence.
Running sed 's/smh/shaking my head/g' on that produces:
shaking my head my head my shaking my head head shaking my head my shaking my head shaking my head my head shaking my head sm head head shaking my head
A professional nitpicker you say?
First of all, “smh my head” doesn’t make any sense. The SMH is an initialism and should therefore be capitalized. The “my head” afterwards evaluates to “Shaking My Head My Head,” so that part should be removed. The comma after should be changed to a period since “Shaking My Head” is a sentence. The second comma should also be changed to a period. “Youngsters these days with their avocado toast and their gig economies,” is a sentence in and of itself, as is everything after said comma. Also, a period should be added to the end of the last sentence.
smh my head my smh head smh my smh smh my head smh sm head head smh
Running
sed 's/smh/shaking my head/g'
on that produces:Running
sed 's/shaking my head/smh/g'
on that produces:Running
sed -E 's/(shaking|my|head)\s?//g'
on that produces:you have out-
sed
-ed me, comrade