wats the problem in this script ?????


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting wats the problem in this script ?????
# 1  
Old 08-05-2005
CPU & Memory wats the problem in this script ?????

hi !

i have generated a RSA key successfully.

But wen i execute the script the " df -k;hostname" is displayed
only for the first device in the ip.txt.

i have several devices in the ip.txt 1 ip a line . . . i wanna ssh each ip
in the ip.txt n execute "df -k;hostname"


wast the problem in this script ?????

#!/bin/ksh
while read line_by_line
do
echo ${line_by_line}
ssh ${line_by_line} “df -k;hostname”
done < ip.txt
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Problem in calling a script inside a script

Hi team, I have a script in different folder. Now i want to call that script and execute that script from that path alone. My code is #!/bin/bash wname=yahoo PATH='/opt/IBM' wac=`/usr/bin/ls $PATH | /usr/bin/grep "$wname"` STOP=`/usr/bin/find $PATH/$wac -type f -name "stop.sh"`... (8 Replies)
Discussion started by: natraj005
8 Replies

2. Shell Programming and Scripting

Shell script newbie, what is problem with my script?

Hello, Ubuntu server 11.10 can anybody help what is problem with my shell script? #!/bin/bash #script to find out currently logged on user is root or not. if ] then echo "You are super" else echo "You are awesome!" fi When I run script, I get following output ./uid: line 3: I... (4 Replies)
Discussion started by: kaustubh
4 Replies

3. Shell Programming and Scripting

Problem while calling a script within a script

Hi , I have moduled my scripts in three scripts . From First script i am calling second and from second i am calling third for some check . Problem is with the third script call. ---In second script EXP ='test.\abc.\Server.*abc.xml.*' pid=$($HOME/bin/checkpid $EXP) --Third... (2 Replies)
Discussion started by: amrishn
2 Replies

4. Shell Programming and Scripting

Problem running a program/script in the background from a script

Hi all, I have a script that calls another program/script, xxx, to run in the background. Supposedly this program at most should finish within five (5) minutes so after five (5) minutes, I run some other steps to run the script into completion. My problem is sometimes the program takes... (5 Replies)
Discussion started by: newbie_01
5 Replies

5. Shell Programming and Scripting

problem using ex in script

SOLVED Hello, im trying to write a simple script that takes 1 parameter (the name of the file) the script then creates the file, makes it executeable. until here it all works fine. then I want to use ex to open the file and write #! /bin/sh/ in it, save it and exit, for then prompting the... (2 Replies)
Discussion started by: drareeg
2 Replies

6. Shell Programming and Scripting

call shell script from perl cgi script problem

hi,, i have perl scipt with line : system('./try.sh $t $d $m'); in shell scipt try.sh i have the line: echo $1 its not printing value of $t that i hav passed..y is it so..i am running it from apache web server (2 Replies)
Discussion started by: raksha.s
2 Replies

7. Shell Programming and Scripting

ssh script problem problem

Hi Please help me with the following problem with my script. The following block of code is not repeating in the while loop and exiting after searching for first message. input_file ========== host001-01 host001-02 2008-07-23 13:02:04,651 ConnectionFactory - Setting session state... (2 Replies)
Discussion started by: pcjandyala
2 Replies

8. Shell Programming and Scripting

script problem

How could I write a script to combine the like check numbers and add their charges, to create one line per check number with a total charge. example of lines: check # check date charge 11211 01/03/06 10.00 11212 01/03/06 ... (3 Replies)
Discussion started by: tdavenpo
3 Replies

9. UNIX for Advanced & Expert Users

wats wrong in the script ?

hi ! i have generated a RSA key successfully. But wen i execute the script the " df -k;hostname" is displayed only for the first device in the ip.txt. i have several devices in the ip.txt 1 ip a line . . . i wanna ssh each ip in the ip.txt n execute "df -k;hostname" wast the problem... (1 Reply)
Discussion started by: pingme8705
1 Replies

10. UNIX for Dummies Questions & Answers

Problem starting a script from a 'main'-script

Please Help! :o I have a main script (ksh) where another script is called (convert_picture). Normally this works ok, but since some changes has been made on the unix-server (I dont know what :( ) suddenly it doesnt work anymore: i get an error message: ksh: convert_picture not found. I am... (3 Replies)
Discussion started by: Rakker
3 Replies
Login or Register to Ask a Question