Skip to content

Group 4#1

Open
thanhhungchu95 wants to merge 1 commit intoframgiatw:masterfrom
thanhhungchu95:group-4
Open

Group 4#1
thanhhungchu95 wants to merge 1 commit intoframgiatw:masterfrom
thanhhungchu95:group-4

Conversation

@thanhhungchu95
Copy link

@thanhhungchu95 thanhhungchu95 commented Jul 25, 2017

Group 4

Member:

  1. Nguyễn Thị Tú Anh (Nguyen Thi Tu Anh)
  2. Nguyễn Văn Hoàn (Nguyen Van Hoan)
  3. Chu Thành Hưng (Chu Thanh Hung)
  4. Nguyễn Ngọc Sơn (Nguyen Ngoc Son)

@thanhhungchu95 thanhhungchu95 changed the title Homework-Linux-Essential-1-Group-4 Group 4 Jul 25, 2017

### Homework 5
```bash
alias kill_all='killall -e'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Có cách nào khác mà ko dùng kill_all, mà sử dụng ps ko em :)

Copy link
Author

@thanhhungchu95 thanhhungchu95 Jul 26, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vigov5
CC: @wataridori
Em có thử một cách nhưng cần viết function do alias không chấp nhận tham số ạ:
function kill_all {
if [ ! $1 ]; then
echo "Need a command or program name"
else
pids=$(ps -aux | grep $1 | grep -v grep | awk '{print $2}')
if [ $pids ]; then
kill -9 $pids
fi
fi
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants