Check if a File or Directory Exists in Bash
In Bash, you can use the test command to check whether a file exists and determine the type of the file.
|
|
If you want your script to be portable you should prefer using the old test `[` command which is available on all POSIX shells. The new upgraded version of the test command `[[` (double brackets) is supported on most modern systems using Bash, Zsh, and Ksh as a default shell.
Full Story |
This topic does not have any threads posted yet!
You cannot post until you login.