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. UNIX for Dummies Questions & Answers
hi,
this is my script #!/bin/ksh
cat temp_file.dat | while read line
do
read test
if ]; then
break
else echo "ERROR"
fi
done
when i execute this code , the script does wait for the user input . it directly prints "ERROR" and terminates after the no. of times as there... (3 Replies)
Discussion started by: siva1612
3 Replies
3. Shell Programming and Scripting
Hello folks,
I've a (perhaps) simple question.
In a text file I've :
server_name1: directory1
server_name2: directory2
server_name3: directory3
I want to make a loop that lets me connect and operate on every server:
rsh server_name1 "ls -l directory1"
I've tried with awk,... (6 Replies)
Discussion started by: gogol_bordello
6 Replies
4. Shell Programming and Scripting
Hi guys
what I wanna do is to create a script where can I input several times a file - assume with read function that will be inserted into a temp. file for further processing. When I press q I want that the loop will stop and continue in my script
I typed this but the options q is not working... (6 Replies)
Discussion started by: kl1ngac1k
6 Replies
5. Shell Programming and Scripting
Hello,
The code below pulls printer information from a three-column file (set by the ${MULTIFILE} variable at the end), that has the printer queue name, IP, and type of printer. It is supposed to use this info to add the printers in the list to one, or more servers . The input file... (3 Replies)
Discussion started by: LinuxRacr
3 Replies
6. Shell Programming and Scripting
hi everyone,
I have the following problem: the foreach loop inside rsh doesn'work.
I have tried the for command but it's not recognized. with the foreach command I don't receive any error, but it doesn't really make the cycle, ignoring the foreach and executing 1 time the echo command. Anyone has... (5 Replies)
Discussion started by: trekianov
5 Replies
7. Shell Programming and Scripting
hi all,
Can you please help me with this issue ?
while ####infinite loop
do
cat file1 |while read var1 var2
do
func1 $var1 $var2
done
cat file2 | while read var11 var22
do
func2 $var11 $var22
done
done
func1 is called till all the values are read... (2 Replies)
Discussion started by: Navatha
2 Replies
8. Shell Programming and Scripting
Hey all
I have two scripts, one script containing the guts of my code.
The other simply loops through a list, calling the other script on each iteration.
Problem is when I add the line
`/usr/bin/rsh -l root $HOSTNAME ""`
to my main script, the loop never seems to exectute any more... (1 Reply)
Discussion started by: mark007
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