I am trying pass value from TK to cshell script using "procedure call" now.... as follow.
proc Run {} {
global passedvalue
## to see what value it has for passedvalue
puts $passedvalue
exec sed -i {s/ABC/$passedvalue/g} runme.sh
exec /bin/csh -c ./runme.sh >@stdout 2>@stderr
}
I am changing a line which has value ABC by new passedvalue. "puts" works and prints the value of passedvalue properly. But it does not work for sed and it gives
Error : Program undefined variable
Please let me know how where I am doing wrong.
I have tried using string map as well but did work either...I might be doing something wrong.