I found myself using a lot of Perl one-liner regexes in my code when I need some small processing on ASCII files which I don't want to open for editing.
Is there a Tcl equivalent to this Perl one-liner command?
perl -i.bak -pe 's/old/new/gi' filename
look at the owh script of Richard Suchenwirth http://wiki.tcl.tk/906 which gives this sort of functionality. Joachim
I once wrote a Tcl script to provide Perl-like command line options. I never used it much myself -- it ended being an exercise in working with sending code to an Tcl interp. If you're interested, the code is at https://bitbucket.org/glenn_j/tcl-command-line-one-liners/src
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With