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
- erlang
- MySQL
- essay
- history
- Software Engineering
- QT
- RFID
- Book
- Java
- django
- Programming
- Book review
- agile
- Malaysia
- Spain
- ubuntu
- web
- Linux
- management
- Italy
- psychology
- Python
- programming_book
- leadership
- Kuala Lumpur
- program
- France
- hbase
- hadoop
- comic agile
Archives
- Today
- Total
목록awk (1)
원하는 process만 kill
#!/bin/bash ps aux | grep test | grep home1 | awk -F" " '{print $2;}' | while read PID; do kill -9 $PID; done; 1. ps aux 2. grep test | grep home1 : testj가 들어가고 거기서 다시 home1만 들어간 행만 선택 3. awk -F" " '{print $2;}' : 공백으로 구분된 것들 중 두 번째 필드들만 출력 4. while read PID; do kill -9 $ PID; done;: 3의 결과를 PID로 읽어 프로세스 삭제
Programming
2009. 1. 16. 16:44