I have a #!/bin/sh script that has the following line:
if [ ! -x "$TEST_SLAPD" ]
$TEST_SLAPD is the full path to a .bat file.
I am wondering what the -x flag means in the context of that if statement?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
ifjust checks for result of command following it.[is not (at least not always) an operator, it’s small utility called ‘test’.From its documentation:
(and yes,
!is obviously negation)For similar evualation flags, documentation is available here: http://illumos.org/man/1/test