See the screen shot.
There is the '[' file at /bin
.
What is the '[' file? What does it do?
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.
Sign up to join this communityThis command is for comparing values, checking file types etc.
Here's a man
page:
NAME
test, [ -- condition evaluation utility
SYNOPSIS
test expression
[ expression ]
It's usually used like this:
if [ -f /etc/passwd ]
then
echo "Yes"
else
echo "No"
fi
For more info, please read the man page ( man [
).
[
on the filesystem, exists for POSIX compliance (IEEE Std 1003.2 (``POSIX.2'')) and not for compatibility or particularly minimalist shells.
Feb 19, 2019 at 12:45
[
. but this is used in the if
command! amaze! Ingenious.