TABLE OF CONTENTS
::pwtk::getExecutable
SYNOPSIS
proc ::pwtk::getExecutable {args} {
PURPOSE
Find an executable program from the list of programs/files and return the first one that is executable.
This is similar but simpler than ::pwtk::findExecutable. While ::pwtk::findExecutable is meant to find the QE executables, ::pwtk::getExecutable is used to find other (generic) executables. The usage of the two commands is different because ::pwtk::getExecutable examines a list of programs, while ::pwtk::findExecutable examines a single program.
ARGUMENTS
- args -- list of possible programs/files to probe for executable status
RETURN VALUE
Full path of the executable or an empty string if the requested executable is not found.
SOURCE
if { [llength $args] == 1 } { set args [concat {*}$args] } foreach exe $args { set result [auto_execok $exe] if { $result != {} } { return $result } } return "" }