I am trying to use ssh to run a program and do not know how to do it. What I am trying to accomplish is to print output from myprogram as it is being posted rather than all at once after myprogram completes. I have this working without the 'exec ssh lx1' portion, but need to be able to access lx1 where myprogram resides.
A snippet of my code is:
set command "exec ssh lx1 /mydir/myprogram $myvariable"
if [catch {open "|$command|&cat"} input]{
$log insert end $input\n
} else {
fileevent $input readable Log
}
Thanks in advance,
Bob
A snippet of my code is:
set command "exec ssh lx1 /mydir/myprogram $myvariable"
if [catch {open "|$command|&cat"} input]{
$log insert end $input\n
} else {
fileevent $input readable Log
}
Thanks in advance,
Bob