티스토리 뷰
#/bin/bash
# 아래는 로그나 파일이름 등에 사용할 현재 시간 구하기.
today="$(date '+%Y.%m.%d')"
echo $today;
nowTime="$(date '+%H:%M:%S')"
echo $nowTime;
# 아래는 내용이 있는 파일을 만드는 경우. 변수 이용 가능.
cat > ./test.txt << "EOF"
This is Test Message...
EOF
# 아래는 특정 파일이 있는지 확인 하는 조건문.
if [ ! -f test ]; then
echo "test file not fount";
fi
# 아래는 temp 디렉터리가 있는지 확인 하고 없는 경우 해당 내용 실행 하는 조건문.
if [ ! -d temp ]; then
echo " temp Directory not fountd!";
mkdir temp
fi
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- devel
- springboot
- ssh
- MySQL
- samba
- place
- Compile
- Spring
- devtools
- JavaScript
- Linux
- Mobile
- Java
- TIP
- gpkiapi
- dart
- SSL
- Security
- Fun
- 맛집
- development
- json parse
- kotlin
- HTTP
- Flutter
- Review
- web
- 엘리스센터
- Android
- food
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
글 보관함