10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi folks. I'm trying to get the following script working for rebooting a bunch of clients. Up to now I've been using PSSH, but when they all startup again at the same time I get a few mount problems. So, I'm trying to stagger the reboot command. I know reboot will depend on what's running at... (3 Replies)
Discussion started by: MuntyScrunt
3 Replies
2. Shell Programming and Scripting
hi All,
cat login.list
server1 userid1
server2 userid2
server3 userid3
----------------------------------------
#SSHSCRIPT.ksh
FILE=login.list
while read vah vah_id
do
ssh $vah -l $vah_id "pwd"
done < "$FILE"
-----------------------------------------
When i... (2 Replies)
Discussion started by: raghur77
2 Replies
3. Shell Programming and Scripting
Dear Friends,
Here I need your guidance once again.
I have for loop which check all files in a folder for a particular string. If the string is found in a file it returns value other than 0 else returns 0 value in variable t2.
At times the string which we are looking for is in first file... (1 Reply)
Discussion started by: anushree.a
1 Replies
4. Shell Programming and Scripting
I have a main script with while loop having for loop inside. Again in for loop based on if condition few functions will be called. So when a function is called for certain condition it should come out from the main for loop and should continue with while loop.
Let me explain with example here:
I... (6 Replies)
Discussion started by: vpv0002
6 Replies
5. Shell Programming and Scripting
Hello Friends,
Im trying to write a script to invoke nagios. In order to do this I grep some words that comes from output of some backup scripts. When there is "End-of-tape detected" in directed output logs it should give alarm. First I would like to know if there is any better way to write... (5 Replies)
Discussion started by: EAGL€
5 Replies
6. Shell Programming and Scripting
Hi friends,
I have 2 scripts. 1) Master_Script.sh and 2) Sub_script.sh
We run Master_script.sh manually where as sub_script.sh keeps generating output in every 2 minutes (through crontab). The output generated by sub_script.sh can be 0 or 1.
As I told you, sub-script.sh keeps generating o/p... (7 Replies)
Discussion started by: anushree.a
7 Replies
7. Linux
Hi ,
I am running this script ( pasting only error code ) to generate some ddl definition for tables . But what I want is to break out of the db2look part when the base_table is not like DIM_$TN or FACT_$TN . After this it should come back to while loop to read the next TN . I read the other... (3 Replies)
Discussion started by: capri_drm
3 Replies
8. UNIX for Advanced & Expert Users
Hi all
I have a while read loop that I use to process a file line by line. The reason I am using this is due the fact that I have spaces in the line and a for loop treats the space as a delimeter for the next record.
In this while loop I have a rsh. It appears that cos of the rsh, I never get... (1 Reply)
Discussion started by: 104234
1 Replies
9. Shell Programming and Scripting
hi
I wanted to use the for loop structure in tandem with rsh command and the result to be redirected into a local .lst file within a shell script .
Tried the following but does not help :confused: .
rsh ABCD "cd /bosp/local/home/linus/;for i in `ls -ltr | grep ^- | awk {'print $9'}`
do... (4 Replies)
Discussion started by: newbee2005
4 Replies
10. Shell Programming and Scripting
Hi ,
reading a "file1" with 2 data in each line (VAR1 and VAR2) , i'm using a while loop like this :
cat file1|awk '{print $1,$2}'|while read VAR1 VA2
do
echo $VAR1
echo $VAR2
done
as this example shows , it works but if between do and done i use
a "rsh" command , the script reads... (6 Replies)
Discussion started by: Nicol
6 Replies