05-06-2019
Looks like $file doesn't exist and never is created, so if's then branch is never executed, flag isn't set to "Y", and the while loop's exit condition is not met.
Proper indentation helps you and others read and understand your code. btw.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi all,
Can anyone tell/guide me how to check remote host is up/running using bash script?
Thanks.
Zulfiqar (5 Replies)
Discussion started by: zulfikarmd
5 Replies
2. Shell Programming and Scripting
I am using KSH and I need to check whether the remote host has been configured with ssh public key. Is there any way we can check inside a script? (6 Replies)
Discussion started by: praveenbvarrier
6 Replies
3. Shell Programming and Scripting
Gurus/Experts
We have a centralized UNIX/Solaris server from where we can actually ssh to all other UNIX/Solaris servers...I need to write a script that reside on this centerlized server and do FileSystem monitoring (basically run df -h or -k) of other remote servers and then send an email to me... (6 Replies)
Discussion started by: anjum.suri
6 Replies
4. UNIX for Advanced & Expert Users
I do a ssh to remote host(A1) from local host(L1). I then ssh to another remote(A2) from A1.
When I do a who -m from A2, I see the "connected from" as "A1".
=> who -m
userid pts/2 2010-03-27 08:47 (A1)
I want to identify who is the local host who initiated the connection to... (3 Replies)
Discussion started by: gomes1333
3 Replies
5. Shell Programming and Scripting
Hi,
My script needs to check whether the remote host is up or not.
If it is up i need to start few servers in that host or else just a notification should be sent that the remote host is down?
Could someone help me out in this?
Regards
Arun (4 Replies)
Discussion started by: arunkumarmc
4 Replies
6. Shell Programming and Scripting
Hi all,
I am a beginner to shell script.Can any one please help me on the below requirement
I need to check whether the file (called 3Com_Files_Delivered.txt) exists on the remote mechaine or not? if so i need to copy all the files from there to my local mechaine.Especially i am... (7 Replies)
Discussion started by: narasimha123
7 Replies
7. Shell Programming and Scripting
flamingo:~ jnojr$ ssh -t macbook sudo -v
Password:
Connection to macbook closed.
flamingo:~ jnojr$ ssh -t macbook sudo cat /etc/cma.conf | grep CMABuildNumber
<CMABuildNumber>2918</CMABuildNumber>
Connection to macbook closed.
flamingo:~ jnojr$ ssh -t macbook sudo -k
Connection to macbook... (3 Replies)
Discussion started by: jnojr
3 Replies
8. UNIX for Dummies Questions & Answers
I am able to connect to a remote host using the legacy IP and port 2222.
Today the remote has a new IP I am unable to connect.
How to check if the remote host is blocking or if its my server is unable to connect.
Err Msg : telnet: Unable to connect to remote host: Connection refused
Err... (5 Replies)
Discussion started by: ITDev01
5 Replies
9. Shell Programming and Scripting
Hi,
Given addresses of 2 remote machines, using a shell script is it possible to
get the state of running processes in "src"
stop all the processes in "src"
exit out of "src"
ssh into "dest"
resume the state of executing processes captured in step 1 in "dest"
Assumption:
"src" is... (3 Replies)
Discussion started by: Saeya Darsan
3 Replies
10. Shell Programming and Scripting
Geeks,
Could you please help me out in my script and identify the missing piece. I need to check/get the exit status of a remote command executed on remote host through script and send out an email when process/processes is/are not running on any/all server(s).
Here's the complete... (5 Replies)
Discussion started by: lovesaikrishna
5 Replies