1
몇 가지 옵션이있는 프로그램을 실행하려고 시도하고 입력 txt 파일로 가져옵니다.tcl에서 실행 파일을 실행하는 방법은 무엇입니까?
set myExecutable [file join $::env(path_to_the_program) bin executable_name]
if { ![file exists $myExecutable ] } {
puts "error"
}
if { ![file executable $myExecutable ] } {
puts "error"
}
set arguments [list -option1 -option2]
set status [catch { exec $myExecutable $arguments $txtFileName } output]
if { $status != 0 } {
puts "output = $output"
}
을 그래서 인쇄의 : 그래서 나는이 시도가
output = Usage: executable_name -option1 -option2 <txt_file_name>
child process exited abnormally