Q: Can dip handle complex strings ?

Q: Can dip handle complex strings ?

Post by Uli Upho » Thu, 29 Dec 1994 16:39:56



Hi,

my university provides a slip connection which works quite well.
After logging in with "slip" I get a message like:

    Opening slip connection to  (123.321.123.321) you are now 123.321.123.xxx

where xxx varies from call to call.

When I tried to customize a dip script to log in automatically
I get an error at the line where I read the ip numbers:

get $remote remote
get $local  remote

So here are my questions:

Can dip handle the above login message and extract the ip numbers from it ?

What is the best way to do it ?

Greetings
Uli Uphoff

--
-----------------------------------------------------------------------------

Ulrich Uphoff                           Tel.: +49 203 379 3029
Universitaet Duisburg                   Fax : +49 202 379 3087
Verbrennung & Gasdynamik

47057 Duisburg 1

-----------------------------------------------------------------------------

 
 
 

Q: Can dip handle complex strings ?

Post by Kevin Lay » Sat, 31 Dec 1994 00:36:52


   my university provides a slip connection which works quite well.
   After logging in with "slip" I get a message like:

       Opening slip connection to  (123.321.123.321) you are now 123.321.123.xxx

   where xxx varies from call to call.

Here is the script I use in a very similar situation, connecting to an
annex:

  # Fetch the IP address of our target host.
main:

  # Set the desired serial port and speed.
  port /dev/modem
  speed 38400

  # Reset the modem and terminal line.
  reset

  # Prepare for dialing.
  send ATZ\r
  wait OK 10
  if $errlvl != 0 goto error
  dial xxxxxxx
  if $errlvl != 0 goto error
  wait CONNECT 60
  if $errlvl != 0 goto error

  # We are connected.  Login to the system.
login:
  sleep 3
  wait word: 10
  if $errlvl != 0 goto error
  send xxxxxxxxxxxx\n
  wait annex 10
  if $errlvl != 0 goto error
  send slip\n

  wait Annex 10
  wait address 1
  wait is 1
  if $errlvl != 0 goto error
  get $remote remote 1
  if $errlvl != 0 goto error

  wait Your 1
  wait address 1
  wait is 1
  if $errlvl != 0 goto error
  get $local remote 1
  if $errlvl != 0 goto error
done:
  print CONNECTED to $remote with address $rmtip we are $local
  default
  mode CSLIP
  goto exit
error:
  print error.
exit:

--
Kevin Layer, Franz Inc.         1995 University Avenue, Suite 275

Phone: (510) 548-3600           FAX: (510) 548-8253

 
 
 

1. quoting complex strings in Korn Shell problem

I am new to the Korn shell and rusty on UNIX.
I need to fix the following piece of code
idlettys='finger|awk if [[ $(expr substr "$0" 1 3)
= $testch ]] then print $(expr substr "$0" 1 3) fi'
I realize I have to somehow quote the string to be processed by awk but
cannot see how.
I've tried a number of combinations but am getting nowhere. Thanks in
advance,
Kate

Sent via Deja.com http://www.deja.com/
Before you buy.

2. Installed linux mandrake 7.1 does not reconize hardware

3. String handling in sh

4. Adding icons to menus on gnome on Solaris 10

5. dip dip dip

6. Lightweight RPC

7. in 'getopt()', how to handle multiple options in the 'optarg' string?

8. Good printer for Linux?

9. sparse tool handling of escaped characters in strings

10. DBCS/MBCS aware string handling functions

11. Q: ksh - how to handle strings with spaces

12. String handling on VAC compiler (version 5) on AIX

13. String handling