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
- maVen
- IntelliJ
- context
- web.xml
- grep
- GIT
- ssh
- 줄바꿈 문자
- lsof
- Windows
- plugin
- resource
- Eclipse
- Mac
- import
- VirtualBox
- 네트워크
- 단축키
- Quartz
- JavaScript
- vscode
- Source
- bash
- Windows 10
- port
- tomcat
- find
- netsh
- xargs
- profile
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