Originally posted by Kyle Mertens
I have a Perl script I want to execute from a tcl script that replaces the delimitors in a file. I was able to do this years ago, but that was on a UNIX server. I am trying it now on Windows and I am not having luck. I know I am missing something simple, but can't find it.
I placed the tcl script under TPS Directory Parse under the Protocol Properties. It works great on UNIX.
Here is the tcl code:
keylget args MSGID mh
set files [msgget $mh]
set dir [file join $env(HCISITEDIR) inFile ]
set script [file join $env(HCISITEDIR) scripts cleanup]
foreach file $files {
set filepath [file join $dir $file]
exec $script $filepath
}
lappend dispList "CONTINUE $mh"
Here is the Perl commands:
perl -pi -e 's/n/r/g' $1
perl -pi -e 's/(.*)r/$1n/' $1
perl -pi -e 's/rMSH/nMSH/g' $1