True when the program invoked by cmd cannot be located on PATH (nor as a
direct path). Cross-platform via which()/exists().
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | cmd |
logical function command_not_found(cmd) character(*), intent(in) :: cmd character(:), allocatable :: prog command_not_found = .false. prog = command_program(cmd) if (len_trim(prog) == 0) return if (len_trim(which(prog)) == 0 .and. .not. exists(prog)) command_not_found = .true. end function command_not_found