Sponsored Content
Full Discussion: Run multiple commands
Top Forums UNIX for Dummies Questions & Answers Run multiple commands Post 302610601 by Scrutinizer on Wednesday 21st of March 2012 12:56:18 PM
Old 03-21-2012
Hi, you can record the process id of background jobs 1 and 2 with $! and then collect their return codes through through the jobs command. The return code of foreground jobs 3 and 4 can be found in $?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Command to run multiple commands from a file.

I need a command, which could run mutliple commands from a file. Let's say, I have mv fileA1 fileB1 mv fileA2 fileB2 ..... mv fileA20 fileB20 I put these commands in a file, then I need a command to run the file as a whole so that I don't need to type 20 times... Anyone tell me how to... (8 Replies)
Discussion started by: kaixinsjtu
8 Replies

2. Shell Programming and Scripting

Run a shell script from one host which connext to remote host and run the commands

I want to write a script which would run from one host say A and connect to other remote host B and then run rest of commands in that host. I tried connecting from A host to B with SSH but after connecting to host B it just getting me inside Host B command prompt. Rest of the script is not running... (6 Replies)
Discussion started by: SN2009
6 Replies

3. Shell Programming and Scripting

Run multiple commands in $() without opening a new shell

The code below works, but takes too many lines and looks awkward: db2 "export to $filename of del select * from $table with ur"|tee -a $LOGFILE|awk '/Number of rows exported:/ {print $5}' > numrows.tmp numrows=$(cat numrows.tmp) rm numrows.tmp When I try the... (2 Replies)
Discussion started by: akar_naveen
2 Replies

4. Solaris

Help with executing multiple remote commands after multiple hops

Hi SSHers, I have embedded this below code in my shell script.. /usr/bin/ssh -t $USER@$SERVER1 /usr/bin/ssh $USER2@S$SERVER2 echo uptime:`/opt/OV/bin/snmpget -r 0 -t 60 $nodeName system.3.0 | cut -d: -f3-5` SSH to both these servers are public-key authenticated, so things run... (13 Replies)
Discussion started by: LinuxUser2008
13 Replies

5. UNIX for Dummies Questions & Answers

How to run multiple piped commands in a find -exec statement?

I can't get this to work. Running a single command works fine: find . -name "*.dat" -exec wc -l '{}' \; gives me the file name and number of lines in each .dat file in the directory. But what if I want to pipe commands, e.g. to grep something and get the number of lines with that pattern... (3 Replies)
Discussion started by: DJR
3 Replies

6. Shell Programming and Scripting

perform 3 awk commands to multiple files in multiple directories

Hi, I have a directory /home/datasets/ which contains a bunch (720) of subdirectories called hour_1/ hour_2/ etc..etc.. in each of these there is a single text file called (hour_1.txt in hour_1/ , hour_2.txt for hour_2/ etc..etc..) and i would like to do some text processing in them. Each of... (20 Replies)
Discussion started by: amarn
20 Replies

7. SuSE

Allow multiple users to run several root commands

I am using SUSE Linux Enterprise Server 10 SP2 (i586) and I had earlier ammended my sudoers file to allow users to become root user with "sudo su - " command Now I am trying to add multiple users to the sudoers file to run several commands such as restarting the server, restarting the nagios... (9 Replies)
Discussion started by: hedkandi
9 Replies

8. Shell Programming and Scripting

[Solved] Run multiple commands in invoked program

Hi, I have coded a program in Haskell using the compiler Hugs and the program requires multiple commands (with parameters) to be entered into it, it then outputs the result of its execution. I need to test a lot of different options (i.e. the parameters) so it would be obvious to automate the... (0 Replies)
Discussion started by: tz742
0 Replies

9. Shell Programming and Scripting

Run multiple commands in ssh

Hi All, I have the below requirement. I want to copy the local file to remote after that i need to run the local script on a remote machine.When i use two ssh commnds i can achieve this. But i want to achieve this using one ssh command. Below command to copy the local file to remote ssh -q... (2 Replies)
Discussion started by: mohanalakshmi
2 Replies

10. UNIX for Advanced & Expert Users

Pass Multiple Commands and Open Multiple Xterms via PSS

Hello, I'm attempting to open multiple xterms and run a command as an SAP user via sudo using PSSH. So far, I'm able to run PSSH to a file of servers with no check for keys, open every xterm in to the servers in the file list, and SUDO to the SAP(ADM) user, but it won't do anything else... (11 Replies)
Discussion started by: icemanj
11 Replies
DH_AUTORECONF(1)						   dh-autoreconf						  DH_AUTORECONF(1)

NAME
dh_autoreconf - Call autoreconf -f -i and keep track of the changed files. SYNOPSIS
dh_autoreconf [debhelper options] [-Xitem] [--mode=mode] [program -- params] DESCRIPTION
dh_autoreconf is responsible for calling autoreconf and creating the files debian/autoreconf.before and debian/autoreconf.after which contain checksums of all files before/after the build. It is complemented by dh_autoreconf_clean which creates a list of all changed and added files and removes them. Please note that dh_autoreconf can only be run once. Thus, if you need to run multiple commands, use a script or similar. An example is given in dh-autoreconf(7). FILES
debian/autoreconf This file can contain a list of directories. If present, dh_autoreconf will only scan the given directories for changes. If no special command is given to dh_autoreconf, it will also forward the directory list to autoreconf which causes it to be run only on those sub directories. OPTIONS
-Xitem --exclude=item Exclude files that contain "item" anywhere in their filename from being checked for changes. This means that those files won't be deleted by "dh_autoreconf_clean" even if there are changes. You may use this option multiple times to build up a list of things to exclude. Starting with version 3, the directories of common version control systems such as cvs, git, hg, svn, and bzr are excluded automatically. --mode=mode Change the way in which modifications to files are detected. The default mode is md5 for using MD5 checksums, but there is also timesize for using the time of the last modification and the file size. --as-needed Enable support for -Wl,--as-needed in all ltmain.sh files identical to the one of the libtool package. This only works in the MD5 mode (the default one). The changes are reverted in dh_autoreconf_clean. You should not prevent LIBTOOLIZE from running with this, as it only works correctly with libtoolize running. program -- params Run the program given by program with the arguments given by params instead of autoreconf -f -i. If you need to run multiple commands, put them in a script and pass the script instead (or add a target to debian/rules). ENVIRONMENT
For each tool executed by autoreconf(1), one can export a variable with the uppercase name of the tool to the specific program which shall be run, including true to prevent the tool in question from being run. The following example shows the beginning of a debian/rules for a package where automake 1.10 shall be run instead of the default automake version and libtoolize shall not be run: #!/usr/bin/make -f export AUTOMAKE = automake1.10 export LIBTOOLIZE = true SEE ALSO
debhelper(7), dh_autoreconf_clean(1), dh-autoreconf(7) AUTHOR
Julian Andres Klode <jak@debian.org> dh-autoreconf v7 2012-11-22 DH_AUTORECONF(1)
All times are GMT -4. The time now is 08:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy