Quantcast
Channel: 우분투 한국 커뮤니티
Viewing all articles
Browse latest Browse all 4577

Re: 스크립트 문의

$
0
0
Author: protochaos
Forum: 기타 질문/답변
Date: 2014-02-03

질문하신 의도가 뭔지 정확히 잘 모르겠어서, 대충 생각난 대로 적어봅니다.

# 홀수줄만 출력
chrt -ap $(pgrep mpd)|sed -n '1~2p'

# 모든 프로세스 번호 출력
chrt -ap $(pgrep mpd)|awk -F "('| )" '{print $2}'|sort|uniq

# 모든 프로세스 종료
chrt -ap $(pgrep mpd)|awk -F "('| )" '{print $2}'|sort|uniq|xargs kill -9

Viewing all articles
Browse latest Browse all 4577

Trending Articles