i guess you sed better than i do. smh. the syntax in the screenshot is the only syntax i’ve ever had to use. i should definitely start reading the mans.
EDIT: actually, while your approach is more elegant, it doesn’t capture what happened in the scene. Hodor doesn’t immediately go from “HOLD THE DOOR” to “HODOR”, there are multiple iterations and it gets less intelligible with each one
This could just be one sed command:
no pipe necessary, just
sed -E 's/TH|[EL ]|DO//g' <<<"$line"I think I find the pipe faster to parse.
idk who downvoted you, it’s a very common sentiment. I advocate for
<<<, but a pipe is often fine when performance doesn’t matter.Performance doesn’t really matter with any of my scripts. They’re mostly for personal use.
And the even funnier thing is getting downvoted for a style preference. XD
i guess you
sedbetter than i do. smh. the syntax in the screenshot is the only syntax i’ve ever had to use. i should definitely start reading the mans.EDIT: actually, while your approach is more elegant, it doesn’t capture what happened in the scene. Hodor doesn’t immediately go from “HOLD THE DOOR” to “HODOR”, there are multiple iterations and it gets less intelligible with each one