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 |
Tags
- JavaScript
- IntelliJ
- 네트워크
- xargs
- Windows 10
- 공통표준용어
- maVen
- import
- find
- resource
- web.xml
- 단축키
- copy-dependencies
- netsh
- bash
- VirtualBox
- Quartz
- Mac
- Eclipse
- DB 도메인
- ssh
- port
- context
- Source
- lsof
- tomcat
- Windows
- GIT
- grep
- profile
Archives
- Today
- Total
목록2019/02/15 (3)
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 # outputret1 is trueret2 is false
OS & Shell/bash
2019. 2. 15. 12:00
[bash] function return
방법1) return $? 사용 func1() { return 111 } func1 result1=$? echo "result1 =" $result1 방법2) echo, $() 사용 func2() { echo 222 } result2=$(func2) echo "result2 =" $result2 echo 여러번, 배열로 반환 func3() { echo 333 echo 444 } result3=$(func3) echo "loop" for i in ${result3[@]} do echo $i done
OS & Shell/bash
2019. 2. 15. 11:57