Re: more OT: search-and-replace commands (was Re: OT: Why is C so popular?)
Von: "Harshwardhan Nagaonkar" <harsh@ee.byu.edu>
> Hahaha. It always amuses me whenever we have a thread about a particular
> topic, which refrences a particular search-and-replace command. Various
> other people reply and give examples with which the said
> search-and-replace command will not work; and then give their own
> versions of the command.
>
> All that said, isn't there like a "One True Search-and-replace Command"
> which will handle all this weirdness of characters being at the
> start/middle/end of words which should not be replaced? This is just an
> informative question though (I hope it doesn't end like an unproductive
> Vi Vs. Emacs sort of discussion). =)
>
right. i was wondering, not long ago, if there's a possibility to merge both parameters of the 'rename' shell script into one and port all this to, say, windows. there are many situations where such a tool would make my life a bit easier...
from what i understood, you can give a perl-like replace command like /find/replace/ and a file filter to select the files to apply this on, like *.txt.
why can't one just make something like /(find.*)\.txt/replace_<uppercase of \1>_<counter>\.txt/
hmm, you got the point?
or were i just sleeping too long and this actually IS possible?
btw, can i do this perl replaces with the pcre library, too? (not inside perl, of course.) if yes, could anyone explain this to me please?
--
Yves Goergen
nospam.list@unclassified.de
Please don't CC me (causes double mails)
Reply to: