How to run a particular process


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to run a particular process
# 1  
Old 06-19-2011
Tools How to run a particular process

Hi I have a perl script where i created 3 nmap scans and the results will output to a text file. But when i run the code the first ip address gets scanned then the others after, but i want to be able to choose which ip address to scan.

Here is my code:

Code:
(`nmap -v -r 99.xxx.xxx -p 1-200>>99.txt`);
(`nmap -v -r 98.xxx.xxx -p 1-200>>98.txt`);
(`nmap -v -r 96.xxx.xxx -p 1-200>>96.txt`);

Is there anyone that can help me?

Last edited by pludi; 06-19-2011 at 07:37 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to detect which process is run by what?

Hello, I am running under ubuntu 14.04 Very long time ago, I set a script (ban.sh) to block ip addresses abusing my system which was not active. I have not touched the server over six months or more. Today, after restart the system, ban.sh started running all of a sudden and keep submitting... (4 Replies)
Discussion started by: baris35
4 Replies

2. Shell Programming and Scripting

How to run Background process one after another

Hii Friends, I am using Perl CGI. I am running A SCP Command via Perl CGI in Background. Like system("scp -r machinename:/PathOfFile/ /Path/WhereToCopyIt/ &) This Copy Process takes some times lets say 15 min. Now I want When This copy process gets complete then send me... (5 Replies)
Discussion started by: Navrattan Bansa
5 Replies

3. Shell Programming and Scripting

script to monitor the process system when a process from user takes longer than 15 min run.

get email notification from from system when a process from XXXX user takes longer than 15 min run.Let me know the time estimation for the same. hi ,any one please tell me , how to write a script to get email notification from system when a process from as mentioned above a xxxx user takes... (1 Reply)
Discussion started by: kirankrishna3
1 Replies

4. UNIX for Dummies Questions & Answers

Run a detached process

Hey guys, Just wondering is there anyway that I would be able to run a detached process that would continue to run regardless of me being logged into the linux host? (4 Replies)
Discussion started by: killaram
4 Replies

5. Shell Programming and Scripting

Run a process but on a certain pid

Hi all, I am having a little bit of trouble trying to find something out. I am trying to script a start/stop php file, for some gaming servers i host. The server have 2 lots of processes running on them, and the customers need to be able to start and stop them at their will. So i know how to... (1 Reply)
Discussion started by: Syth
1 Replies

6. UNIX for Dummies Questions & Answers

Run process with nohup every certain time

Hi, I need execute a script every 30 minutes. As might be done without using cron Thx. (6 Replies)
Discussion started by: pepeli30
6 Replies

7. Solaris

how to run a killed process

hi, i am creating a daemon process for updating the file at regular interval.one problem with this is if anybody kills the daemon it wont update the file.anybody have idea how to rerun the daemon if it killed.the code is written in c++ in solaries environment. thnaks & regards suresh (8 Replies)
Discussion started by: suresh_rtp
8 Replies

8. UNIX for Dummies Questions & Answers

Check the process before run or not

Dear all, I am writing a shell that check the java application already run. If it is not run before it will run next commands. ps -ef | grep java Thank you :) (3 Replies)
Discussion started by: mr_bold
3 Replies

9. Programming

how can i run a process for a whole minute?

here's the problem, i have two processes that i need to run and both process should be run at a total of 1 minute each. how do i do that? and one more here's what the processes do: the 1st process show the '+" sign infinitely while the 2nd process displays the "-" infinitely. how could i count the... (1 Reply)
Discussion started by: kelogs1347
1 Replies

10. UNIX for Dummies Questions & Answers

How can I run a process under particular ID?

I have a script that needs to run under ID say "xyz". the way I do normally is to "su" to the id, enter the password of "xyz" and run the process. However, is there any way run the process under "xyz" without "su" to the ID. A person with root access would be able to run any process under any ID as... (4 Replies)
Discussion started by: ucbus
4 Replies
Login or Register to Ask a Question
Test::Script(3) 					User Contributed Perl Documentation					   Test::Script(3)

NAME
Test::Script - Basic cross-platform tests for scripts DESCRIPTION
The intent of this module is to provide a series of basic tests for 80% of the testing you will need to do for scripts in the script (or bin as is also commonly used) paths of your Perl distribution. Further, it aims to provide this functionality with perfect platform-compatibility, and in a way that is as unobtrusive as possible. That is, if the program works on a platform, then Test::Script should always work on that platform as well. Anything less than 100% is considered unacceptable. In doing so, it is hoped that Test::Script can become a module that you can safely make a dependency of all your modules, without risking that your module won't on some platform because of the dependency. Where a clash exists between wanting more functionality and maintaining platform safety, this module will err on the side of platform safety. FUNCTIONS
script_compiles script_compiles( 'script/foo.pl', 'Main script compiles' ); The "script_compiles" test calls the script with "perl -c script.pl", and checks that it returns without error. The path it should be passed is a relative unix-format script name. This will be localised when running "perl -c" and if the test fails the local name used will be shown in the diagnostic output. Note also that the test will be run with the same perl interpreter that is running the test script (and not with the default system perl). This will also be shown in the diagnostic output on failure. script_runs script_runs( 'script/foo.pl', 'Main script runs' ); The "script_runs" test executes the script with "perl script.pl" and checks that it returns success. The path it should be passed is a relative unix-format script name. This will be localised when running "perl -c" and if the test fails the local name used will be shown in the diagnostic output. The test will be run with the same perl interpreter that is running the test script (and not with the default system perl). This will also be shown in the diagnostic output on failure. SUPPORT
All bugs should be filed via the bug tracker at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Script> For other issues, or commercial enhancement and support, contact the author. AUTHOR
Adam Kennedy <adamk@cpan.org> SEE ALSO
prove, <http://ali.as/> COPYRIGHT
Copyright 2006 - 2009 Adam Kennedy. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. perl v5.16.3 2009-11-24 Test::Script(3)