LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   bash scripting...A command that can stop others (https://www.linuxquestions.org/questions/linux-newbie-8/bash-scripting-a-command-that-can-stop-others-799108/)

ntelos 03-31-2010 07:52 AM

bash scripting...A command that can stop others
 
Hi...i would like to ask something very simple i hope for most off you but i couldn't find anything in other questions so specific...

So...i need a command to stop another command...lol

more specific i have to run airodump-ng and i want this command to stop after some seconds (or minutes) automatically....

May someone write me the syntax...

Thanks a lot!!!

crts 03-31-2010 07:57 AM

Hi,

you might want to have a look at the manpages of pidof and kill:
Code:

man pidof
man kill


troop 03-31-2010 08:01 AM

command to kill airodump-ng is
Code:

killall airodump-ng
command to execute any command after some time is at
e.g.
Code:

# at now + 5 minutes
> killall airodump-ng

will kill airodump-ng after 5 minutes

onebuck 03-31-2010 08:11 AM

Hi,

Welcome to LQ!

Apparently you are aware of 'BASH' (from title) and too lazy to learn the inner working or for that matter even looking up or searching for a solution.

Your lucky this time as others have provided a means to a solution.

You could perform a LQ Search, Google or even reading from these useful links;

Linux Documentation Project
Rute Tutorial & Exposition
Linux Command Guide
Bash Reference Manual
Advanced Bash-Scripting Guide
Linux Newbie Admin Guide
LinuxSelfHelp
Getting Started with Linux

These links and others can be found at 'Slackware-Links' .
More than just SlackwareŽ links!

arashi256 03-31-2010 08:49 AM

Quote:

Originally Posted by onebuck (Post 3919112)
Hi,

Welcome to LQ!

Apparently you are aware of 'BASH' (from title) and too lazy to learn the inner working or for that matter even looking up or searching for a solution.

Your lucky this time as others have provided a means to a solution.

You could perform a LQ Search, Google or even reading from these useful links;

Linux Documentation Project
Rute Tutorial & Exposition
Linux Command Guide
Bash Reference Manual
Advanced Bash-Scripting Guide
Linux Newbie Admin Guide
LinuxSelfHelp
Getting Started with Linux

These links and others can be found at 'Slackware-Links' .
More than just SlackwareŽ links!

There is a difference between gently chiding a new user to do a little bit of research (in the Newbie section, no less) and just being plain rude. I'd be surprised if the OP returned with a response like that. Google only helps if you know the command to look for. Welcome indeed.

Jerk.

To the OP: Please don't take this as the prevailing attitude of all members. While it is generally encouraged that users do some research first - as I pointed out this only really works if you know what to look for. As long as some degree of effort is displayed, everyone will be perfectly polite. Please don't let the above poster put you off.

onebuck 03-31-2010 01:32 PM

Hi,

Quote:

Originally Posted by arashi256 (Post 3919169)
There is a difference between gently chiding a new user to do a little bit of research (in the Newbie section, no less) and just being plain rude. I'd be surprised if the OP returned with a response like that. Google only helps if you know the command to look for. Welcome indeed.

Jerk.

To the OP: Please don't take this as the prevailing attitude of all members. While it is generally encouraged that users do some research first - as I pointed out this only really works if you know what to look for. As long as some degree of effort is displayed, everyone will be perfectly polite. Please don't let the above poster put you off.

Who's being rude by calling other members names? What was rude about my post?

Who made you my judge? I didn't violate a LQ Rule. What about your abide?

Quote:

LQ Rule;

* Do not post any messages that are obscene, vulgar, sexually-orientated, hateful, threatening, or otherwise violative of any laws.
* Personal attacks on others will not be tolerated.
* Flame Wars will not be tolerated.
* Do not post if you do not have anything constructive to say in the post.
* Your thread may be moved to a more appropriate forum at a moderator's discretion.
* Challenge others' points of view and opinions, but do so respectfully and thoughtfully ... without insult and personal attack. Differing opinions is one of the things that make this site great.
* Do not post the same discussion in more than one forum. Duplicate discussions can be frustrating for other members. Try and pick the most relevant forum for your post. If you are unsure put it in Linux - General.
* The best place for your question is in the forum. We get a large number of emails. If your email contains a technical question we will kindly point you to the forums. This also includes using the email forms to advertise or send out surveys. Do however email us when you need to discuss anything private regarding the site that should not be asked in the forums.
* There is no advertising allowed in the forums. If you are interested in advertising, please contact us.
* Do not intentionally circumvent any other rule or measure explicitly stated elsewhere on the site.
* Do not expect LQ members to do your homework - you will learn much more by doing it yourself.
* While almost every question does get an answer, we cannot guarantee a response. If your thread does not receive any responses, it will automatically be bumped twice.
* Posts containing information about cracking, piracy, warez, fraud or any topic that could be damaging to either LinuxQuestions.org or any third party will be immediately removed.
* All member-created content should be in English. This allows our moderators to ensure all content complies with all LQ rules.
* We would like to stress that you should fully understand what a recommended change may do to your system. You should not give anyone you do not know login information to your system. LinuxQuestions.org cannot be held liable for anything you do as a result of information obtained at this site.

Pointing the OP to refernce links and suggesting to do a search doesn't violate anything.

I see several violation(s) made by you in the above rules. So think before you decide to spank someone.

:hattip:

ntelos 03-31-2010 05:14 PM

Thanks a lot for your help
 
I just want to refer that i take a look at google as everyone does....that was because i agree with you,that opening a new post is our last solution but honestly i couldn't refer in anyone else...

Again thanks a lot guys for you help.


All times are GMT -5. The time now is 09:29 PM.