10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to check multiple server's "uptime" in a loop over "ssh".
When I execute multiple ssh commands with hard coded servernames script is executing fine.
But when I pass server names using while loop, script is exiting after checking first server's status, why?
# serverList... (8 Replies)
Discussion started by: kchinnam
8 Replies
2. UNIX for Dummies Questions & Answers
Hello all :)
I want to know how can i do to loop a command each minute for example ?
I'm in SSH under Putty ;)
Thanks you for your help :) (1 Reply)
Discussion started by: stevefigueras
1 Replies
3. Shell Programming and Scripting
Hi gurus,
I hit a block when write the script.
I need do while loop, in the loop I have code below.
sqlplus -s abc/abc@abc <<EOF
spool testwhile
select *
from dual;
spool off
exit;
EOF
when I run script with only this code, it works fine.
if I add code as below:
#!/bin/ksh
... (5 Replies)
Discussion started by: ken6503
5 Replies
4. Shell Programming and Scripting
Greetings,
I have an issue that has baffled me. I have done many searches, read the man documentation, and I have yet to find a solution. I am trying to run the following command within a script to copy a file across servers:
$(dd if="$FDIR" bs=1024 2> /dev/null | ssh "$(whoami)@$SERVER"... (5 Replies)
Discussion started by: unaligned
5 Replies
5. Shell Programming and Scripting
Hi all,
Is it possible to make this possible ?
$ echo $SKY_HOME
/var/sink/SKY
$ echo $SKY_HOME
/home/smily/SKY
$ ssh root@xyz "echo $SKY_HOME"
root@xyz 's password: ******
/home/smily/SKY wrong output
I was expecting the output as
/var/sink/SKY (3 Replies)
Discussion started by: linuxadmin
3 Replies
6. Shell Programming and Scripting
I have written the following script to update some Debian boxes.
#!/bin/bash
mxg_hosts_file="/etc/mxg/ssh-hosts"
while read line ; do
mxg_host="$(echo ${line} | awk -F":" '{print $1}')"
mxg_port="$(echo ${line} | awk -F":" '{print $2}')"
echo "Connecting and Upgrading... (3 Replies)
Discussion started by: jelloir
3 Replies
7. Shell Programming and Scripting
Hi All,
Noob question here...
How do I kill the 3rd command in this ssh chain effectively?
# ssh -t -t 10.80.0.5 'ssh 10.80.0.6 | /var/tmp/some_script'
The "/var/tmp/some_script" contains: ssh 10.80.0.81 'echo "Hello World!!!!" >> /tmp/sample.txt'The problem is that once the sample.txt... (2 Replies)
Discussion started by: NYG71
2 Replies
8. Shell Programming and Scripting
I need to process a dirtree containing ms office files such that each file is stored as a variable and also, just the file file stem. Why? They will be using as input and output parameters for another script. For example /path/to/second_script -i filename.docx -o filename
Here's what I... (1 Reply)
Discussion started by: graysky
1 Replies
9. Shell Programming and Scripting
Hello,
I need to run a command on remote Linux using the ssh command from my local machine. I am able to execute the command on remote machine using ssh but it's behaving strangely.
The command is supposed to start a daemon process on remote linux box and the control should return back to me... (5 Replies)
Discussion started by: nitinshukla
5 Replies
10. Shell Programming and Scripting
Hi
I use the following command to check if my_base is active or not :
active_db=`${LOCAL_BIN}/ssh -l ${my_user} ${my_service} "ps -ef | grep ora_smon | grep ${my_base} | sed -e \"s/ */ /g\" | cut -d'?' -f2 | cut -d' ' -f3 | cut -d'_' -f3"`
When I use a file listing databases to check them... (1 Reply)
Discussion started by: madmat
1 Replies