
지난 글의 출발은 짧은 script #!/bin/bash if python3 then echo "hahaha" else echo "..." fi 이었습니다. 이제 if 다음의 python3 가 이상하지 않습니다. 왜냐하면 if 일반적으로 다음에 command 가 따라온다. 을 알기 때문이지요. python3 는 command 이니 문제가 없습니다. ( ls, echo 등등을 python3 위치에 넣고 실행해 보세요!) 그럼 이제 python3 는 참이냐? 거짓이냐? 는 의문을 가질 수 있습니다. But 다른 언어들과는 다르게 shell 에서 if 는 참, 거짓이 아니라 뒤따르는 command 의 exit code 를 바탕으로 분기 합니다. 그리고 command 가 정상 종료했을 때, 즉 exit code..
Programming Language/Shell Programming
2022. 7. 3. 12:13
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 다익스트라
- JavaScript
- Shell Programming
- max flow
- 정수론
- nearest common ancestor
- BOJ
- Aho-Corasick
- bash
- dynamic programming
- fenwick tree
- number theory
- script
- stack
- shell
- 세그먼트 트리
- math font
- Vim
- Dijkstra
- segment tree
- map
- bash script
- RUBY
- Reference
- persistent segment tree
- 백준
- lazy propagation
- C++ big number
- python3
- javascript array
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함