help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to test a object name is an executable ?


From: Budi
Subject: How to test a object name is an executable ?
Date: Thu, 31 Aug 2023 07:17:22 +0700

How  do we test an object name / string is an executable, as tried it
won't work:

$ [[ -x cp ]] &&echo YES
$
$ [[ -x ls ]] &&echo YES



also tried it hard won't be correct way:

$ >/dev/null type ls && echo YES
YES

$ >/dev/null type -fat && echo YES
YES
This the very falling failure thanks for help before



reply via email to

[Prev in Thread] Current Thread [Next in Thread]