07-19-2011
several command in background
hi everyone!
I would like to know if someone can tell me how to run several command in background on one line.
I already tried thisi:
cmd1 &; cmd2 &; cmd3 &
--->produce an error syntax
cmd1 ; cmd2 ; cmd3 &
--->don't execute in bg
cmd1 & cmd2 & cmd3 &
--->execute asynchronously (cmd3 finish before cmd2)
THANKS IN ADVANCE!!!
Je vais peut-être me rabatre sur la création d'un script qui contiendra mas commandes, et j'executerais ce script en bg..
C'est chiant mais si il n'existe pas d'autres soluces
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
For example:
% ls /store > list.txt
% less list.txt
% 1.txt
% 2.txt
I want to execute 'ls' in verbose and store the result in background to 'list.txt' so i dont have to execute another command just to view the contents of the 'list.txt'
% ls /store > list.txt
% 1.txt
% 2.txt
%... (2 Replies)
Discussion started by: jehrome_rando
2 Replies
2. UNIX for Dummies Questions & Answers
I have a command running in the foreground (and so my term window is locked up) and I want to kill it, then resume it in the background and go home. It is creating a zip file, and the file will be written to the current directory - no std in / std out issues.
How do I do this? Kill it with a... (3 Replies)
Discussion started by: hindesite
3 Replies
3. AIX
Guys
I'm working to make in AIX script and I have some commands need to be excited by that script
Like the below commands ...
startsrc -s sshd
I want that executing to be in the background of the system I do not like to see the out put of that (3 Replies)
Discussion started by: Mr.AIX
3 Replies
4. Shell Programming and Scripting
Hi ,
I want to see all the background process that are running in unix box machine...please guide me is there any specific command for that..since I am executing some scripts at background..!!:confused: (1 Reply)
Discussion started by: nks342
1 Replies
5. Shell Programming and Scripting
Dear All,
Writing a script in which I want to run a command in background and keep it running even script is finished.
I have tried like below,
`truss -p <pid> >> & /tmp/log &`
But doesnt work.. script goes running and nothing in log file. (7 Replies)
Discussion started by: Deei
7 Replies
6. Solaris
hi all
i am running following command
ufsdump 0ubf 512 /dev/rmt/0cbn /database/backup2/rman_backup/level1 >> /database/backup2/backup_tape/level1_rman_03aug12 2>&1;
i want to run it in background how can i do it
in this i am generating logs for backup.
the problem occurs when i am... (3 Replies)
Discussion started by: nikhil kasar
3 Replies
7. Shell Programming and Scripting
Is there any way to trigger a sequence of commands in parallel and capture their output in variables? e.g. something on the following lines
x=`echo "X" &`
y=`echo "Y" &`
z=`echo "Z" &`
so that $x, $y, and $z evaluate to X, Y and Z res. (7 Replies)
Discussion started by: jawsnnn
7 Replies
8. Linux
Hi All,
i am trying to put ls -lRt command to run in the background but it fails.
i continue to get output on screen and didnt get the command prompt right after i put the command in background.
command i am using is
ls -lRt &
i am using bash.
Can someone let me know how to... (6 Replies)
Discussion started by: omkar.jadhav
6 Replies
9. UNIX for Dummies Questions & Answers
I am trying to run a command. This is one of my attempts:
for i in fileservera; do ssh -t $i 'sudo ls /';doneThis works, and I see the directories. However, what I want to do now is start a process on the remote server such as /usr/bin/connectproc -standalonesudo /usr/bin/connectproc... (1 Reply)
Discussion started by: newbie2010
1 Replies
LEARN ABOUT DEBIAN
benchmark::apps
Benchmark::Apps(3pm) User Contributed Perl Documentation Benchmark::Apps(3pm)
NAME
Benchmark::Apps - Simple interface to benchmark applications.
SYNOPSIS
This module provides a simple interface to benchmark applications (not necessarily Perl applications).
use Benchmark::Apps;
my $commands = {
cmd1 => 'run_command_1 with arguments',
cmd2 => 'run_command_2 with other arguments',
};
my $conf = { pretty_print=>1, iters=>5 };
Benchmark:Apps::run( $commands, $conf );
DESCRIPTION
This module can be used to perform simple benchmarks on programs. Basically, it can be used to benchmark any program that can be called
with a system call.
FUNCTIONS
run
This method is used to run benchmarks. It runs the commands described in the hash passed as argument. It returns an hash of the results
each command. A second hash reference can be passed to this method: a configuration hash reference. The values passed in this hash
override the default behaviour of the run method. The configuration options available at this moment are:
"pretty_print"
When enabled it will print to stdout, in a formatted way the results of the benchmarks as they finish running. This option should de
used when you want to run benchmarks and want to see the results progress as the tests run. You can disable it, so you can perform
automated benchmarks.
Options: true(1) or false(0)
Default: false(0)
"iters"
This is the number of iterations that each test will run.
Options: integer greater than 1
Default: 5
"args"
This is a reference to an anonymous function that will calculate the command argument based on the iteraction number.
Options: any function reference that returns a string
Default: empty function: always returns an empty string, which means no arguments will be given to the command
run
This method runs the commands described in the hash passed as argument. It returns an hash of the results and return codes for each
command.
pretty_print
This method is used to print the final result to STDOUT before returning from the "run" method.
time_this
This method is not meant to be used directly, although it can be useful. It receives a command line and executes it via system, taking
care of registering the elapsed time.
EXAMPLES
Check files in "examples/".
AUTHOR
Aberto Simoes (aka ambs), "<ambs at cpan.org>" Nuno Carvalho (aka smash), "<smash @ cpan.org>"
BUGS
Please report any bugs or feature requests to "bug-benchmark-apps at rt.cpan.org", or through the web interface at
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Benchmark-Apps <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Benchmark-Apps>. I will be
notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Benchmark::Apps
You can also look for information at:
o RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Benchmark-Apps <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Benchmark-Apps>
o AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Benchmark-Apps <http://annocpan.org/dist/Benchmark-Apps>
o CPAN Ratings
http://cpanratings.perl.org/d/Benchmark-Apps <http://cpanratings.perl.org/d/Benchmark-Apps>
o Search CPAN
http://search.cpan.org/dist/Benchmark-Apps <http://search.cpan.org/dist/Benchmark-Apps>
COPYRIGHT & LICENSE
Copyright 2008 Aberto Simoes, Nuno Carvalho, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-01-15 Benchmark::Apps(3pm)