unix - How to check if a directory exists in a shell script - Stack Overflow

unix - How to check if a directory exists in a shell script - Stack Overflow

瀏覽:739
日期:2025-09-27
What command can be used to check if a directory does or does not exist, within a shell script? ... Grundlefleck wrote: if [ -d $DIRECTORY ]; then Remember to always wrap variables in double quotes when interpolating them in a bash script....看更多