Solved

setup shell script

Posted on 1998-05-18
3
240 Views
Last Modified: 2013-12-15
I'm trying to work out exactly how my slakware system logs in to my ISP. In my /usr/sbin directory, there's a small bash script called ppp-on; it contains the following function:

function initialize
{
    chat -v TIMEOUT 3 '' AT 'OK-+++\c-OK'
    return
}

Could someone explain what each part of this script does?

Thanks,

David King
ventnor@psinet.net.au
0
Comment
Question by:vexil
  • 2
3 Comments
 
LVL 51

Accepted Solution

by:
ahoffmann earned 100 total points
ID: 1627196
chat -v TIMEOUT 3 '' AT 'OK-+++\c-OK'
     ^^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^
     |  |set    | |__ chat script __|
     |  |timeout|
     |  |to 3sec|
     |  |for nxt|
     |  |expect |
     |  |string |
     |  +-------+_
     \--- erbose mode of chat script

The chat script is given as command line parameters, it reads as follows:
    ''     expect (wait for) nothing
    AT     send  AT  command
    OK     expect  OK
    +++\c  send +++ (without a newline)
           this command usualy aborts all modem actions
    OK     expect  OK
0
 

Author Comment

by:vexil
ID: 1627197
Thanks, ahoffmann!
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1627198
e-e did reformat my answer, but you understand anyway ;-)
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now