Sed is a unix command that allows very powerful string editing. In this case, I wanted to find all instances of a certain phrase in a string of text, and delete them. With sed, this is a trivial task. Without sed in Windows Script Host, it was an annoying series of commands to find the location of the start of the phrase, cut out everything before the phrase, cut out everything after the phrase, stick those two together, and discard the phrase.
Ugh. The only thing I know about coding is that it keeps my computer running when it doesn't crash it. And something about semicolons. Nonetheless, I can feel your pain in those few sentences.
Couldn't make it work. Couldn't find an example with it working. Hated the nonhelpful error messages enough that I did the 10 lines of other code needed to replace() it.
I can't believe you said that either. I'm a trifle more familiar with awk, but in either case I loathe regular expressions almost as much as I loathe APL. Both are immensely powerful but dreadfully obtuse.
Overall, I'm siding with jsbowden here, but I still agree about commenting them. If only a little note saying what the original programmer was TRYING to accomplish, so you can totally rewrite it if necessary.
After all, apparently not all humans come with an innate comprehension of regexes preinstalled. ;)
vi is a text editor written by people who think interfaces - any interface at all - is for wimps and communists.
emacs is vi but not only are interfaces for wimps and communists, but everything needs to be fetishistically included in a single program, because of a crippling fear of ever starting anything but emacs from the command line.
Oh, come on, what's nonintuitive about ESC-:q!-ENTER? That's ALWAYS what I try first when I'm in a program that has NO INDICATION AT ALL OF HOW ANYTHING WORKS.
(I hate sed, too. I just want it for it's search/replace functions.)
(no subject)
Date: 2007-03-21 10:14 pm (UTC)Congratulations!
(no subject)
Date: 2007-03-22 12:21 am (UTC)(no subject)
Date: 2007-03-22 12:33 am (UTC)(no subject)
Date: 2007-03-21 11:08 pm (UTC)(no subject)
Date: 2007-03-22 12:21 am (UTC)(no subject)
Date: 2007-03-21 11:56 pm (UTC)(no subject)
Date: 2007-03-22 01:08 am (UTC)(no subject)
Date: 2007-03-22 02:57 am (UTC)In that case, they're dirty class traitors who should be shot pour encourager les autres.
(no subject)
Date: 2007-03-22 01:31 pm (UTC)After all, apparently not all humans come with an innate comprehension of regexes preinstalled. ;)
(no subject)
Date: 2007-03-22 02:50 pm (UTC)Too sexy for vi
Too sexy for vi
Too sexy a guy
And I'm
Too sexy for emacs
Too sexy for emacs
It's just used by hacks
--Right Sed Fred
(no subject)
Date: 2007-03-22 02:53 pm (UTC)emacs is vi but not only are interfaces for wimps and communists, but everything needs to be fetishistically included in a single program, because of a crippling fear of ever starting anything but emacs from the command line.
(no subject)
Date: 2007-03-22 02:55 pm (UTC)coming soon: emacsOS. It was only 12 more lines of code!
(no subject)
Date: 2007-03-22 02:59 pm (UTC)(I hate sed, too. I just want it for it's search/replace functions.)