Results 1 to 10 of 10

Thread: How to break the line in BASH?

  1. #1

    How to break the line in BASH?

    Hi all. As some of you know I have been trying to make a dial up script that promps for a passwd. I am 99% done. All I need to know is how to break the line or like a CTRL-C so that if they get the password wrong it dumps them off the modem line. Anyone know the syntax? Thanks in advance. I will post the scripts once it is final in case anyone else ever needs it.

  2. #2

    Re:How to break the line in BASH?

    you don't mean the good old

    \

    do ya? e.g.

    this is a single line \
    and this is part of the same line ?

  3. #3

    Re:How to break the line in BASH?

    No, hehe, I didn't exlpain it good enough. I meant the line as in phone line. You know so they get bumped off the phone line. Disconnected. I should have said disconnected, that makes more sense. How do I do that in a script?

  4. #4
    Mentor
    Join Date
    Jun 2001
    Posts
    1,672

    Re:How to break the line in BASH?

    You just need to send an ATH command to the serial port the modem is on. I'm not sure, however how to talk to the serial port in bash ...

  5. #5

    Re:How to break the line in BASH?

    Well I did alot of searching and still can't get it. Even with the ATH thing I can't find info. I read somewhere that `^d' is control d, but it didn't work. Any other suggestions or places where I can search. Thanks.

  6. #6

    Re:How to break the line in BASH?

    hello,
    while i have never done this i think minicom has ways you can call it with scripts to issue commands, i am positive things like this get done quite commonly...

  7. #7

    Re:How to break the line in BASH?

    [quote author=datamike link=board=1;threadid=5179;start=0#51141 date=1033564053]
    Well I did alot of searching and still can't get it. Even with the ATH thing I can't find info. I read somewhere that `^d' is control d, but it didn't work. Any other suggestions or places where I can search. Thanks.
    [/quote]
    ^D is used to mean control D, but you write it by Control-V Control-D.

    are you trying to echo this to /dev/ttyS0 ? or what?

  8. #8

    Re:How to break the line in BASH?

    Yes, well ttyQa16 but anyway, yes I need emulate control-d so it disconnects them from the dial up line if they get the password wrong.

  9. #9

    Re:How to break the line in BASH?

    I'm probably a million miles off here towards answering your question, but I use "ifup ppp0" to connect and "ifdown ppp0" to disconnect my modem. If I've completely missed the question, sorry.

    Jim

  10. #10

    Re:How to break the line in BASH?

    [quote author=datamike link=board=1;threadid=5179;start=0#51177 date=1033616438]
    Yes, well ttyQa16 but anyway, yes I need emulate control-d so it disconnects them from the dial up line if they get the password wrong.
    [/quote]

    echo -e "^D" > /dev/ttyQa16

    the ^D you make by hitting control-v followed by control-d

    good luck

Similar Threads

  1. Linux Junior Break Fix
    By coltrane in forum Announcements and Suggestions
    Replies: 12
    Last Post: 12-16-2004, 12:18 AM
  2. Cut me a break!
    By tolstoy in forum General Chat
    Replies: 8
    Last Post: 04-06-2004, 03:10 PM
  3. Sun's McNealy Wants to Break Windows
    By Kernel_Killer in forum General Chat
    Replies: 1
    Last Post: 11-19-2003, 09:19 AM
  4. Can I break the rules for POSIX locks
    By TaraMc in forum Linux - Software, Applications & Programming
    Replies: 2
    Last Post: 07-23-2002, 04:12 PM
  5. DoJ break up Apple in M$ monopoly case
    By popcorn in forum General Chat
    Replies: 3
    Last Post: 12-01-2001, 09:08 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •