nil.enroll(aetheric_username, quantum_class_id) (adric) wrote,
nil.enroll(aetheric_username, quantum_class_id)

  • Location:
  • Mood:
  • Music:

Want to really mess with vi's head?

Sure you do, if only in tiny retribution for all of the suffering it and its' kin have wrought. No? You'd rather not provoke it? Well, then don't try anything like this:

:%g/ServerAlias/ !sed -e 's/www.//'

... as not only does that not work, but it's gets vi (and sh?) into some kind of loop that I couldn't find a way out of. Closing gvim worked to kill it, but nothing short of that seemed to phase it. In vim even closing the terminal tab didn't bother the process, and I had to kill -9 it (as kill had failed).

If anyone happens to know why this does not work or why it causes so much trouble, speak up. Escaping the period in www. made no difference and the first time I typoed the -e and used -s with the same results. Obviously I have not given up enough SAN to gain the unholy knowledge of RegEx because to me that seems a perfectly reasonable request to scan the file for lines that have ServerAlias in tham and then run the sed command (externally) on only those lines. (^ServerAlias matches just as well, of course)

Back into the fray. There is a different solution to this particular exercise but I am trying to understand how this stuff works in general and these .. pseudo-euclidean distortions in what seems like simple logic really make it hard. I'm never trying to do anything complicated or fancy and yet so often my regex incantations fail to affect the target universe or do something unexpectedly destructive (ibid)...

Tags: vi bug

  • Weird Dream, anyone else?

    My flat was at the end of the hall against the building wall. Her flat was at the other end opposite the stair door. I don't know now who she is,…

  • Weird dreams

    So our heroes narrowly escape after some sort of amazing tactical victory (think A New Hope, although I'm certain the scene is not from there), and…

  • Please *do* glorify some great hackers and not crime

    Please *do* glorify some great hackers and not crime Re: "Stop Glorifying Hackers"(sic) from the M. McWhorter, I'm sorry you had trouble safely…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded