wats wrong in the script ?


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users wats wrong in the script ?
# 1  
Old 08-05-2005
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 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 Smilie
# 2  
Old 08-05-2005
change

ssh ${line_by_line} “df -k;hostname”

to

ssh -n ${line_by_line} “df -k;hostname”
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

What's wrong with the following script

# Log directory and file LOGDIR=. LOGFILE=$LOGDIR/wgetlog-`date +%m-%d-%y-%H:%M`.log ...... $WGET --user-agent="Mozilla/5.0" --secure-protocol=auto --post-data $AUTH_DATA --save-cookies=$COOKIE_FILE --keep-session-cookies $SSO_SERVER$SSO_AUTH_URL -O sso.out >> $LOGFILE 2>&1 ........ ... (2 Replies)
Discussion started by: jediwannabe
2 Replies

2. Shell Programming and Scripting

Why result is wrong here ? whether break statement is wrong ?

Hi ! all I am just trying to check range in my datafile pls tell me why its resulting wrong admin@IEEE:~/Desktop$ cat test.txt 0 28.4 5 28.4 10 28.4 15 28.5 20 28.5 25 28.6 30 28.6 35 28.7 40 28.7 45 28.7 50 28.8 55 28.8 60 28.8 65 28.1... (2 Replies)
Discussion started by: Akshay Hegde
2 Replies

3. Shell Programming and Scripting

Can anyone tell me what's wrong with my script

Hi... I am fed up in file handing with array for comparing.... 1st I want save first 2 columns of file 1 I tried like this,, {getline< "file1";ln=$1; lt=$2}then I read second file's 1st and 2nd column..and saved like this and small calculation and initialization var1 =$1 var2 =$2... (5 Replies)
Discussion started by: Akshay Hegde
5 Replies

4. Shell Programming and Scripting

What is wrong with this script?

I write this script and do not no whrer the wrong!! Can anyone hlep me? #========================================= Script Name: shell_script1 #========================================= looptrack=y while do echo -n “Type in the account number:” read account echo -n “Type the first and... (3 Replies)
Discussion started by: Oman_Member
3 Replies

5. Shell Programming and Scripting

What's wrong with my script ....

Please see below mentioned my script ... it ran once without any issue .... then after it is not coming out .... please suggest what is wrong? #!/bin/ksh ## if (( ${num_errors} > 0 )); export ACULOG=/home/varshnes/input export num_errors=10 **** Search for 'Start correcting roll up... (7 Replies)
Discussion started by: heyitsmeok
7 Replies

6. Shell Programming and Scripting

Script Gone Wrong

Hello all, so this is a script i did for an assignement, - first option greets the user according to the time after fetching his name - second options isn't implemented - third check the performance according to how many users are using the system - creates a log of names, time and ip of the... (14 Replies)
Discussion started by: ibzee33
14 Replies

7. Shell Programming and Scripting

What's wrong with this script

I am trying to create a script but it is giving me errors on Cygwin for the following script. Could someone tell me, what am I doing wrong? choice=1000 echo "choice is $choice" while ; do echo "choice is $choice" echo 'Please select your option:' echo '1. Option 1' echo '2. Option 2'... (3 Replies)
Discussion started by: amitg1980
3 Replies

8. Shell Programming and Scripting

What is wrong with this script?

I keep getting errors messages for the "else" statement at line 81? #!/bin/ksh ######### Environment Setup ######### PATH=/gers/nurev/menu/pub/sbin:/gers/nurev/menu/pub/bin:/gers/nurev/menu/pub/mac :/gers/nurev/menu/adm/sbin:/gers/nurev/menu/adm/bin:/gers/nurev/menu/adm/mac:/ge... (8 Replies)
Discussion started by: heprox
8 Replies

9. Shell Programming and Scripting

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... (0 Replies)
Discussion started by: pingme8705
0 Replies

10. UNIX for Dummies Questions & Answers

What is wrong with my script?

Hey guys, can someone help me with this script... #!/bin/sh dir=`pwd` for i in *.f do if then M=`wc -l < ${i} sed -e 's://.*::' < ${i} | \ (echo "//${i} -"$M ; cat - ) > $i.tmp chmod 700 $i ; mv ${i}.tmp $i ... (6 Replies)
Discussion started by: Lem2003
6 Replies
Login or Register to Ask a Question