일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- grep
- GIT
- JavaScript
- maVen
- Windows
- lsof
- copy-dependencies
- IntelliJ
- ssh
- resource
- 단축키
- bash
- DB 도메인
- import
- Mac
- Windows 10
- web.xml
- tomcat
- xargs
- netsh
- Quartz
- VirtualBox
- find
- 네트워크
- profile
- context
- Eclipse
- Source
- 공통표준용어
- port
- Today
- Total
목록2019/02 (9)
develog
bash 명령어를 원격 서버에서 실행하기 $ ssh user01@ubuntu01 hostname sh -s 로컬 서버의 shell script 파일을 원격 서버에서 실행하기 $ ssh user01@ubuntu01 'bash -s' curr_dir.txt'
# 패키지 설치$ rpm -Uvh 패키지파일이름.rpm # 패키지 삭제$ rpm -e 패키지이름 # 설치된 패키지 확인 $ rpm -qa 패키지이름$ rpm -qi 패키지이름
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
방법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
프로세스 찾아서 kill 하기kill -9 `ps aux | grep java | grep -v grep | awk '{print $2}'`