03-21-2012
Hi Thanks for you reply. How can I store the return code of cmd 1,2& 3 before the start of cmd 4? Please help!!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
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
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
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
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
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
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
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
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
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
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
LEARN ABOUT DEBIAN
fiu-run
fiu-run(1) General Commands Manual fiu-run(1)
NAME
fiu-run - a script to launch programs using libfiu
SYNOPSIS
fiu-run [options] program [program arguments]
DESCRIPTION
fiu-run is a script to make it easier to launch programs using libfiu(3). It can enable failure points and start libfiu's remote control
capabilities before starting to execute the program, avoiding the need to write a special launcher to inject failures.
It is specially useful when used to inject failures in the POSIX/libc functions, because it does not require any program modifications.
After launching programs with fiu-run, fiu-ctrl(1) can be used to enable and disable their failure points at runtme.
For additional documentation, go to the project's website at http://blitiri.com.ar/p/libfiu.
OPTIONS
-c command
Run the given libfiu remote control command before executing the program (see below for reference).
-x Use the POSIX libfiu preload library, allows simulate failures in the POSIX and C standard library functions.
-f ctrlpath
Enable remote control over named pipes with the given path as base name, the process id will be appended (defaults to "$TMPDIR/fiu-
ctrl", or "/tmp/fiu-ctrl" if "$TMPDIR" is not set). Set to "" to disable remote control over named pipes.
-l path
Path where to find the libfiu preload libraries. Defaults to the path where they were installed, so it is usually correct.
Remote control commands are of the form "command param1=value1,param2=value2". Valid commands are:
'enable name=NAME'
Enables the NAME failure point unconditionally.
'enable_random name=NAME,probability=P'
Enables the NAME failure point with a probability of P.
All of the enable* commands can also optionally take failnum and failinfo parameters, analogous to the ones taken by the C functions.
EXAMPLES
The following will run the fortune(1) program simulating faults in read() with 5% probability (note that the -x parameter is required in
this case to enable failure points in the POSIX and libc functions):
fiu-run -x -c "enable_random name=posix/io/rw/read,probability=0.05" fortune
By running it multiple times you will see that sometimes it works, but most of the time you get different errors, resulting from the simu-
lated failures.
SEE ALSO
libfiu(3), fiu-ctrl(1).
BUGS
If you want to report bugs, or have any questions or comments, just let me know at albertito@blitiri.com.ar. For more information about
libfiu, you can go to http://blitiri.com.ar/p/libfiu.
16/Jun/2009 fiu-run(1)