I have a question concerning the following script which I can execute in a terminal:
telnet horizons.jpl.nasa.gov 6775
I will be asked to enter a certain number in order to select an object
(just for completness 301=moon, the tool yields the ephemeris for solar system objects)
Horizons> 301
now I have to press Enter for continuing...
Next step is for example ([E]phemeris:
Horizons>E
and so on....
My question:
Is it possible to enter the full information (e.g 301 && E.....) at once?
If yes, can I read in a (shell) script in order to run the object selection?
Automating telnet can be annoying. It doesn't have well-defined control mechanisms for text buffering and process control and multiple streams the way ssh has, which makes automating it a long sequence of print ; sleep ; print ; sleep ; print ; sleep etc.
Expect might help you. autoexpect in particular, which can generate a script from commands you execute, which you can modify to your needs after.
autoexpect works fine! I can perform all the things I want, execept the following:
I execute the following command:
That means, all lines including "b0" will be passed to the script object1.csv.
The problem, when I run telnet in the terminal I get the following output:
that means the script does not show the full output.
The user has to scroll down in order to see further output. Unfortunately, my command cannot handle it.
Is it possible to show the full output?
Cheers,
Gordon
Last edited by Corona688; 03-25-2013 at 12:36 PM..
Without seeing your expect script it's hard to correct it, but one could probably get it to respond to the line "< Scroll & Page: space, <cr>, <b>ack, OR arrow keys. <q> ends display. >" by printing a space.
Hi
I have A Sun Ultra Enterprise 450 server, it has Solaris installed on it.
I have A serial terminal hooked up to it (nullmodem cable plugged into serial port 1 on the box, and the other end plugged into the serial port of A laptop (NEC Versa M300))
The laptop is running Ubuntu 12.04.2... (3 Replies)
how to Change the % prompt to - prompt in unix
:wall:
---------- Post updated at 07:40 AM ---------- Previous update was at 07:38 AM ----------
How To display the last modification time of any file in unix
---------- Post updated at 07:40 AM ---------- Previous update was at 07:40 AM... (2 Replies)
Hi All,
I want to configure samba share permission so that only directory creator/owner has a read and write permission and other users should not have any read/write access to that folder.Will that be possible and how can this be achieved within samba configuration.
Regards,
Sahil (1 Reply)
Hi all,
I wish to know whether Unix can access window's file in Unix's terminal?
Apart from that, how to copy files or share files between Window and Unix? I get to know of secure copy, however, my company's Unix does not support the feature of secure copy? Any other method for me to share/... (5 Replies)
Hi
I have a perl script code in which connecting with db2 database and doing some process. My perl script code and db2 database server present in the same unix server. I am connecting and executing perl script code via windows telnet. Now my question is i could not able to connect db2 server... (4 Replies)
hi all,
i want to know y kernel is giving access for multiple users to access a file when one user may be the owner is executing that file. Because other user can manipulate that file when the other user is executing that file, it will give the unexpected result to owner . plz help me... (1 Reply)
I have an ultra sparc 2 with no video - I connect to it with hyperterm.
Is there a way to get to the OK prompt? I have tried control/break and that does not work.
If not is there a video card I can get to put in this box?
I have Solaris 10 installed on this machine.
Thanks (7 Replies)
Kindly give me insight to this problem that l am encountering on window 2000 professional. I want to delete a file with .dll. If l delete the file its prompt access denied.
Every option under the file attribute signify that the no deny was checked, but still l can't delete the file. Also l tried... (3 Replies)
Hi
I need to access files from a specific folder of a Linux system from an another Linux System Remotely.
I know how to, Export a folder on One SCO System & can access the same by using Import via., NFS in the Sco Unix SVR4 System using the scoadmin utility.
Also, I know to use mount -t ... (2 Replies)