Solved

setup shell script

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
I NEED A "BARE" LINUX ... 9 119
Apache LDAP Authentication 20 70
NTPD Client Port Usage 12 87
linux convert text file to PDF 7 66
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
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.
Suggested Courses

740 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