Solved

setup shell script

Posted on 1998-05-18
3
252 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
android secure ftp 3 52
Linux Samba using Kerberos to Auth from Active Directory 9 71
Impact of disabling SMB v1 on Mac and Linux clients 4 548
Moving from Mcrypt to OpenSSL 18 46
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…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

828 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