Reading response from server


Login or Register for Dates, Times and to Reply

 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Reading response from server
# 1  
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  
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  
hmnn

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

Any suggestions?
# 4  
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  
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 for Dates, Times and to Reply

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #381
Difficulty: Medium
Solaris 9 is registered as UNIX 03 compliant on 32-bit and 64-bit x86 (X86-64) and SPARC systems
True or False?

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. Shell Programming and Scripting

Reading File from Server - perl

Hey, I'm trying to read a file from a server. Simple file with some numbers. Here is the code i'm running. use Net::SSH::Perl::SSH1 ; $scon = Net::SSH::Perl->new ("com123.sever.mydomain.com",(protocol=>'2',port=>'22',debug=>'true')); $scon->login("user123","pass123"); open(FILE,... (9 Replies)
Discussion started by: Phi01
9 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

Featured Tech Videos