Linux
[Shell Script] 쉘스크립트 directory, file 유무 확인
nineDeveloper
2020. 6. 11. 17:07
728x90
#!/bin/bash
# 디렉토리 존재 유무 확인
if [ ! -d 디렉토리명 ];then
mkdir 디렉토리명
fi
# 파일 존재 유무 확인
if [ ! -e 디렉토리명 ];then
touch 파일명
fi
728x90