Shell script

General software, Operating Systems, and Programming discussion.
Everything from software questions, OSes, simple HTML to scripting languages, Perl, PHP, Python, MySQL, VB, C++ etc.
Post Reply
Bazza84
Member
Posts: 73
Joined: Mon Mar 16, 2009 1:54 pm

Shell script

Post by Bazza84 »

Realy stuck, I'm a total scripting nooby

I need a bash-shell script that terminates all processes of a certain name which is given to the shell script as argument.

Any help would be so greatly appreciated

Thanks again
User avatar
akbarri
Posts: 935
Joined: Tue Dec 30, 2008 4:21 pm
Location: Caterpillar Inc

Post by akbarri »

List the running process

Code: Select all

$ [B]ps[/B]
PID TTY TIME CMD
[color="Red"]1293[/color] pts/5 00:00:00 MyProgram
Then Kill it

Code: Select all

$ [B]kill[/B] [color="red"]1293[/color]
[2]+ Terminated MyProgram
Help

Code: Select all

$ help [B]kill[/B]

# OS: Windows, Linux # Browser: Blink, Gecko, Presto, Webkit + Squid + Bind
Bazza84
Member
Posts: 73
Joined: Mon Mar 16, 2009 1:54 pm

re

Post by Bazza84 »

Thank you very much :)

How can I make it into a scipt?
Post Reply