View previous topic :: View next topic |
Author |
Message |
YamahaRacer n00b
Joined: 22 Jun 2002 Posts: 4 Location: The Motor City
|
Posted: Mon Jun 24, 2002 10:02 pm Post subject: Looking for help with shell scripting |
|
|
OK, here's the scoop. I'm new to shell scripting, but I'd like to try my hand at it. I've found my first task, but try as I might I get the darn thing working. I have to access different ports on a 16 port annex server. To do said task I have a small executable binary program. The program basically opens a new terminal window telnets to the correct IP/PORT address and refreshes the terminal to prevent hangup. To use this program I have to enter the following:
$open_port
c(cmd line) s (shell)
>s
enter IP address:
>155.128.258.79
would you like to open all 16 ports [Y N]
>N
please enter the ports you would like to open [i.e. 7 8]
>4 4
$
What I'd like is a shell script that sends the open_port command, s, IP address, N, and lets me enter the ports I'd like to have opened. Ive tried:
open_port | s
but to no avail. Any help would be greatly appreciated. Thanks _________________ Mahalo
Last edited by YamahaRacer on Tue Jun 25, 2002 12:18 am; edited 1 time in total |
|
Back to top |
|
|
mksoft l33t
Joined: 28 May 2002 Posts: 844
|
Posted: Mon Jun 24, 2002 10:48 pm Post subject: |
|
|
Try to save the commands to a text file and redirect open_port's input to the file, e.g:
Code: | open_port < _file_name_containing commands_ |
_________________ There's someone in my head but it's not me - Pink Floyd |
|
Back to top |
|
|
YamahaRacer n00b
Joined: 22 Jun 2002 Posts: 4 Location: The Motor City
|
Posted: Tue Jun 25, 2002 12:19 am Post subject: Looking for help with shell scripting |
|
|
That did the trick. Thanks a lot. _________________ Mahalo |
|
Back to top |
|
|
|