Reading response from server


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Reading response from server
# 1  
Old 03-24-2004
Reading response from server

I am trying to write a korn shell script which posts commands to a server and read the response back from the server.


Any idea how I can read the servers response?
I have tried doing the following:

(
LOGIN:xxxxx
command to server
read ANSWER
echo $ANSWER >file1
) | telnet server port


This connects - sends command - but I do not see the response...
# 2  
Old 03-24-2004
if using ssh from one server to another that has been set up to allow login without a password being sent, then

ssh server2 uptime > /tmp/uptime.server2

will work and place the output into /tmp/uptime.server2 on server1.

Or you might look into using Expect if you can't use ssh.
# 3  
Old 03-24-2004
hmnn

I need to send a few hundred commands to this server and read answer from each individual command..

Any suggestions?
# 4  
Old 03-24-2004
I don't see how that is working for you. I get:
LOGIN:: not found
which is what I would expect.

But if it is working, have that command send the output to a file on the remote server (and thus local to the command running on the server). Then ftp it back.
# 5  
Old 03-24-2004
hi...


LOGIN is for a application process on the server....
This works okay.....


just not sure how to trap the output returned to the login...
I will keep searching...thanks anyway
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Choosing VPN server based on server response times

Hello all, I am using the VPN provider Private Internet Access. I am using the Raspberry Pi 4 with 4GB of RAM, performance on this upgraded board is great. Anyways I am connecting to its service using systemd's openvpn-client @ US_New_York_City.service I wonder if I can create a... (5 Replies)
Discussion started by: haloslayer255
5 Replies

2. Shell Programming and Scripting

Problem reading terminal response string from Zsh

Note: This posting is related to my posting at bash - Reading answer to control string sent to xterm - Stack Overflow , but I could get there a solution only for bash. I can use that solution, but for curiosity, I wonder, whether I could do this in Zsh as well. The problem is to send a (Posix-)... (6 Replies)
Discussion started by: rovf
6 Replies

3. Shell Programming and Scripting

[Solved] Need Help in reading Response file

Hi All, I have a requirement to read response file which looks like below Ex: NAME=SAM DOB=01/01/1980 ADDRESS= 7658 James Street NewYork 0000 Now, I need to take NAME, DOB, ADDRESS into variables I am fine taking NAME and DOB I need help on how can I... (6 Replies)
Discussion started by: mallak
6 Replies

4. IP Networking

Tshark/pcap and web-server response time

Hi everyone! How can I get response time difference between GET and HTTP/1.0 200 OK (i mean time latency of web-server) with using of tshark&shell or something else for each hostname from pcap file? What can you recommend me to do that? (1 Reply)
Discussion started by: lepetal
1 Replies

5. Web Development

Apache Web Server - Invalid Response

Hi, I have a SCO Unix Openserver V6 server which is hosting a website with Apache V1.3 as the http server. The web site has an initial login screen which re-directs to another page once the user name and password has been verified. When connecting to the website and trying to login, it times... (0 Replies)
Discussion started by: Martyn
0 Replies

6. Web Development

[PHP] Script to Time Remote Server Response and Email

Here is a simple PHP script I wrote that times getting a link using mtime with curl and emails if it does not meet my objective. I use it in production for checking the performance of a Content Delivery Network (CDN), but you can use it for any web server. <?php $heartbeat =... (1 Reply)
Discussion started by: Neo
1 Replies

7. UNIX for Advanced & Expert Users

ssh error: Error reading response length from authentication socket

Hi - I am getting the error `Error reading response length from authentication socket' when I ssh from my cluster to another cluster, and then back to my cluster. It doesn't seem to affect anything, but it's just annoying that it always pops up and tends to confuse new users of the cluster. I... (1 Reply)
Discussion started by: cpp6f
1 Replies

8. Shell Programming and Scripting

TCL Reading file from Server

I'm nearly finished developing my app, im programming it in tcl/tk. I just need to get 1 last thing done. When my app starts, i ask the user for username and password. These are stored on a file on a unix server. My problem is how do i read a file from a unix server, i've tried everything but... (3 Replies)
Discussion started by: Phi01
3 Replies

9. Shell Programming and Scripting

SNMP Timeout: No Response from server

When I tried to connect snmp from one server to another server Timeout: No Response from server is comming Pls suggest (0 Replies)
Discussion started by: madhusmita
0 Replies

10. What is on Your Mind?

Any recommended reading for net+/server+

my school offers A+\Net+\Server+ which isn't the same as the official ones from compTIA but I feel its a good start anyways. I already have the A+ and am going for my net and server next year. So Im looking for any recommended reading etc. to better prepare myself because unlike the A+, I don't... (2 Replies)
Discussion started by: blowFish@ubuntu
2 Replies
Login or Register to Ask a Question