![만약 [-f 파일]; 평균?](https://rvso.com/image/1416875/%EB%A7%8C%EC%95%BD%20%5B-f%20%ED%8C%8C%EC%9D%BC%5D%3B%20%ED%8F%89%EA%B7%A0%3F.png)
Bash 파일에 if 문이 있습니다.
if [ -f bin/post_compile ]; then
echo "-----> Running post-compile hook"
chmod +x bin/post_compile
sub-env bin/post_compile
fi
은 무슨 -f
뜻인가요?
답변1
파일이 존재하고 일반 파일인 경우.
http://www.tldp.org/LDP/Bash-Beginners-Guide/html/sect_07_01.html
영어로 된 귀하의 진술:
"/bin/post_compile" 파일이 존재하고 일반 파일인 경우:
- 메시지 인쇄
- 파일을 실행 가능하게 만들기
- 다음을 사용하여 파일을 실행합니다.
sub-env
fi
( ) 이면 종료