Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- tomcat
- netsh
- JavaScript
- bash
- web.xml
- VirtualBox
- Windows
- resource
- plugin
- Mac
- port
- profile
- xargs
- GIT
- maVen
- Eclipse
- grep
- context
- lsof
- vscode
- ssh
- find
- 네트워크
- 줄바꿈 문자
- import
- Windows 10
- IntelliJ
- Source
- 단축키
- Quartz
Archives
- Today
- Total
develog
[bash] existStr 본문
existStr
existStr() { if [[ $1 == *"$2"* ]]; then echo true else echo false fi } ret1=$(existStr "Server start up in" "start") ret2=$(existStr "Server start up in" "Start") if $ret1; then echo "ret1 is true" else echo "ret1 is false" fi if $ret2; then echo "ret2 is true" else echo "ret2 is false" fi |
# output
ret1 is true ret2 is false |
'OS & Shell > bash' 카테고리의 다른 글
[bash] tmux (0) | 2020.09.16 |
---|---|
[bash] 다중 명령 실행 && || ; (0) | 2020.09.15 |
[bash] 로컬 shell script 파일을 원격 서버에서 실행하기 (0) | 2019.02.26 |
[bash] function return (0) | 2019.02.15 |
[bash] kill ps grep awk (0) | 2019.02.15 |
Comments