Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

setup shell script

Posted on 1998-05-18
3
Medium Priority
?
270 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 51

Accepted Solution

by:
ahoffmann earned 400 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
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 …
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.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

636 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