-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I have this site in my bookmarks, it was not helpfull in this case.
FYI, I tried the same exercise on a different file, with a different target (regular text), just to test my syntax, and everything worked as expected. It seems that the commas are the problem, which is weird because as far as I know, commas are not a special character in regex. I will look again in the morning, likely it is something ridiculously trivial and probably even more obvious. Cheers, Juan Alberto Cirez wrote: > Gustin Johnson wrote: > I have a client who has mysteriously damaged a whole bunch of files. > Basically, there are 2300 files in a directory and sub-directories, > which are comma delimited. Somehow a bunch of files had an extra comma > added at the end of some lines. What I need to do is to remove double > commas ",," from the _end_ of some lines in each file (there are double > commas in the middle of the line that must be untouched). > > This screams sed to me, but I am missing something, since I cannot seem > to find the regex incantation that will find two commas at the end only. > > It seemed simple, but then I am used to vim syntax (:%s/,,$/,/g), which > normally also works in sed for me. > > Any help would be appreciated. > > Cheers, >> _______________________________________________ clug-talk mailing list [email protected] http://clug.ca/mailman/listinfo/clug-talk_clug.ca Mailing List Guidelines (http://clug.ca/ml_guidelines.php) **Please remove these lines when replying >> > Gustin, > Try this... > http://www.student.northpark.edu/pemente/sed/sed1line.txt -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFNa3AwRXgH3rKGfMRAiWNAKCvq0i1dBoK/2jpMoQWEg+KPH50XACfe4d5 q8mGzXGM/s2J0vmiRYqRfr8= =uJ4O -----END PGP SIGNATURE----- _______________________________________________ clug-talk mailing list [email protected] http://clug.ca/mailman/listinfo/clug-talk_clug.ca Mailing List Guidelines (http://clug.ca/ml_guidelines.php) **Please remove these lines when replying

