You're replying to a comment by dj.

December 14, 2010, 05:00

This really was an excellent way to learn sed commands. Thank you.

I like the braces vs -e. Any problems with that, std wise.

This:
-- sed -e :a -e 's/^.\{1,78\}$/ &/;ta'
verses:
-- sed '{:a; s/^.\{1,78\}$/ &/; ta}'

If it's something I'm keeping I put the commands on separate lines and use # comments at the end of the line for each command, as necessary. The opengroup doc says, "Ignore the '#' and the remainder of the line", so I think modern sed is okay. I'm using gnu sed, and no errors, but s2p didn't like them.

Over at grymoire.com sed tutorial, his examples showed a space between the address/range and the command, and for some reason, visually that helped.

This:
-- sed '/start/,/stop/ s/#.*//'
verses:
-- sed '/start/,/stop/s/#.*//'

Reply To This Comment

(why do I need your e-mail?)

(Your twitter handle, if you have one.)

Type the word "network_95": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.