• Terminal Help: Stuck Again

    From Craig Stevenson@yocraigst@gmail.com to comp.sys.mac.system on Sunday, April 16, 2006 15:40:46
    From Newsgroup: comp.sys.mac.system

    This has happened before, but this time I thought I'd ask for help...


    My normal prompt in Terminal is my user name folowed by a dollar sign.
    (My IP address is in there somewhere also). Every once in a while, and
    I've just done it now, I apparently type the wrong thing and the prompt
    changes to a ">". No words before it, nothing else, just that. Nothing
    I type at that point seems to have any effect except hitting "return"
    gives me a new line.

    What did I get myself into and how do I get out?

    Thanks!!

    (Yes, I'm going to get a book on all this stuff probably tomorrow)
    --- Synchronet 3.18b-Win32 NewsLink 1.113
  • From Alice Faber@afaber@panix.com to comp.sys.mac.system on Sunday, April 16, 2006 16:48:01
    From Newsgroup: comp.sys.mac.system

    In article <160420061540469065%yocraigst@gmail.com>,
    Craig Stevenson <yocraigst@gmail.com> wrote:

    This has happened before, but this time I thought I'd ask for help...


    My normal prompt in Terminal is my user name folowed by a dollar sign.
    (My IP address is in there somewhere also). Every once in a while, and
    I've just done it now, I apparently type the wrong thing and the prompt changes to a ">". No words before it, nothing else, just that. Nothing
    I type at that point seems to have any effect except hitting "return"
    gives me a new line.

    What did I get myself into and how do I get out?

    Thanks!!

    (Yes, I'm going to get a book on all this stuff probably tomorrow)

    It's probably some kind of editor. When this happens to me, I start
    flailing with things that I know quit some editors: q(uit), e(x)it,
    ctrl-c, ctrl-z, :q, etc. Often, I end up just closing the terminal
    window and starting over. Of course, you might lose your command
    scroll-back that way.

    --
    AF
    "Non Sequitur U has a really, really lousy debate team."
    --artyw raises the bar on rec.sport.baseball
    --- Synchronet 3.18b-Win32 NewsLink 1.113
  • From Dave Balderstone@dave@N_O_T_T_H_I_Sbalderstone.ca to comp.sys.mac.system on Sunday, April 16, 2006 14:52:59
    From Newsgroup: comp.sys.mac.system

    In article <160420061540469065%yocraigst@gmail.com>, Craig Stevenson <yocraigst@gmail.com> wrote:

    What did I get myself into and how do I get out?

    You've invoked some app. Try typing "q", "exit" or CTRL-C.
    --- Synchronet 3.18b-Win32 NewsLink 1.113
  • From Craig Stevenson@yocraigst@gmail.com to comp.sys.mac.system on Sunday, April 16, 2006 16:04:38
    From Newsgroup: comp.sys.mac.system

    Control-c got me out. Thanks!!!!

    In article <afaber-691FB7.16480116042006@reader1.panix.com>, Alice
    Faber <afaber@panix.com> wrote:

    It's probably some kind of editor. When this happens to me, I start
    flailing with things that I know quit some editors: q(uit), e(x)it,
    ctrl-c, ctrl-z, :q, etc. Often, I end up just closing the terminal
    window and starting over. Of course, you might lose your command
    scroll-back that way.
    --- Synchronet 3.18b-Win32 NewsLink 1.113
  • From Craig Stevenson@yocraigst@gmail.com to comp.sys.mac.system on Sunday, April 16, 2006 16:05:33
    From Newsgroup: comp.sys.mac.system

    Thanks!

    In article <160420061452590324%dave@N_O_T_T_H_I_Sbalderstone.ca>, Dave Balderstone <dave@N_O_T_T_H_I_Sbalderstone.ca> wrote:

    You've invoked some app. Try typing "q", "exit" or CTRL-C.
    --- Synchronet 3.18b-Win32 NewsLink 1.113
  • From Dave Seaman@dseaman@no.such.host to comp.sys.mac.system on Sunday, April 16, 2006 22:16:07
    From Newsgroup: comp.sys.mac.system

    On Sun, 16 Apr 2006 15:40:46 -0500, Craig Stevenson wrote:
    This has happened before, but this time I thought I'd ask for help...


    My normal prompt in Terminal is my user name folowed by a dollar sign.
    (My IP address is in there somewhere also). Every once in a while, and
    I've just done it now, I apparently type the wrong thing and the prompt changes to a ">". No words before it, nothing else, just that. Nothing
    I type at that point seems to have any effect except hitting "return"
    gives me a new line.

    What did I get myself into and how do I get out?

    Thanks!!

    (Yes, I'm going to get a book on all this stuff probably tomorrow)

    You have invoked a shell command that is incomplete. The shell is asking
    you to continue the command on the next line.

    One way to get this behaviour is to leave an unclosed quote on the
    command line. In that case, the shell is waiting for you to finish
    typing the string that you started.

    Another way is to invoke a multiline shell command, such as

    $ for FILE in *.c
    do
    echo $FILE
    wc -l $FILE
    grep include $FILE
    done
    $

    The ">" means more input is expected. Completing the command will get
    you back to the "$" prompt. If you get the command by accident, a ctrl-C
    will get you out, as you found.


    --
    Dave Seaman
    U.S. Court of Appeals to review three issues
    concerning case of Mumia Abu-Jamal.
    <http://www.mumia2000.org/>
    --- Synchronet 3.18b-Win32 NewsLink 1.113
  • From Craig Stevenson@yocraigst@gmail.com to comp.sys.mac.system on Sunday, April 16, 2006 18:29:33
    From Newsgroup: comp.sys.mac.system

    In article <e1ufn7$bpf$1@mailhub227.itcs.purdue.edu>, Dave Seaman <dseaman@no.such.host> wrote:

    You have invoked a shell command that is incomplete. The shell is asking
    you to continue the command on the next line.

    One way to get this behaviour is to leave an unclosed quote on the
    command line. In that case, the shell is waiting for you to finish
    typing the string that you started.

    Yes, there was an open quote.

    Thanks!!!!
    --- Synchronet 3.18b-Win32 NewsLink 1.113
  • From William Mitchell@mitchell@math.ufl.edu to comp.sys.mac.system on Sunday, April 16, 2006 19:34:26
    From Newsgroup: comp.sys.mac.system

    Craig Stevenson <yocraigst@gmail.com> writes:

    My normal prompt in Terminal is my user name folowed by a dollar sign.
    (My IP address is in there somewhere also). Every once in a while, and
    I've just done it now, I apparently type the wrong thing and the prompt changes to a ">". No words before it, nothing else, just that. Nothing
    I type at that point seems to have any effect except hitting "return"
    gives me a new line.


    You have typed an incomplete command, and the ">" is the secondary
    prompt indicating that this is a continuation line.

    For example

    $ echo "Hello World" |
    > echo

    The pipe symbol '|' at the end indicates that the standard output from the first echo command is to be the standard input of another command.
    Since the second command was not given on the first line, the shell
    waits for the command to be completed (or at least continued) on the
    next line. In shell programming, it is common to have chained
    commands of this sort which are 5 or 10 lines long.

    Another example would be

    $ echo &&
    >

    Here '&&' means 'and', and the shell is waiting to see "and what?".
    --
    Bill Mitchell
    Dept of Mathematics, The University of Florida
    PO Box 118105, Gainesville, FL 32611--8105
    mitchell@math.ufl.edu (352) 392-0281 x284
    --- Synchronet 3.18b-Win32 NewsLink 1.113
  • From Alan Baker@alangbaker@telus.net to comp.sys.mac.system on Monday, April 17, 2006 22:59:30
    From Newsgroup: comp.sys.mac.system

    In article <160420061540469065%yocraigst@gmail.com>,
    Craig Stevenson <yocraigst@gmail.com> wrote:

    This has happened before, but this time I thought I'd ask for help...


    My normal prompt in Terminal is my user name folowed by a dollar sign.
    (My IP address is in there somewhere also). Every once in a while, and
    I've just done it now, I apparently type the wrong thing and the prompt changes to a ">". No words before it, nothing else, just that. Nothing
    I type at that point seems to have any effect except hitting "return"
    gives me a new line.

    What did I get myself into and how do I get out?

    Thanks!!

    (Yes, I'm going to get a book on all this stuff probably tomorrow)

    You've entered a command which can accept input from the keyboard and it
    is looking for you to enter some text. Usually (I'm not sure about
    always, so I won't claim it) you can exit by typing control-D.

    Example:

    [agbaker] : grep alan
    This is a line that doesn't contain the word
    This line contains "alan"
    This line contains "alan"

    aln
    alan
    alan
    Alan
    [agbaker] :
    Every time I typed a line that contained the search text ("alan") grep
    echoed the line back. I typed control-D to exit.

    HTH

    --
    Alan Baker
    Vancouver, British Columbia
    "If you raise the ceiling 4 feet, move the fireplace from that wall
    to that wall, you'll still only get the full stereophonic effect
    if you sit in the bottom of that cupboard."
    --- Synchronet 3.18b-Win32 NewsLink 1.113
  • From Bob Harris@nospam.News.Bob@remove.Smith-Harris.us to comp.sys.mac.system on Tuesday, April 18, 2006 02:24:19
    From Newsgroup: comp.sys.mac.system

    In article <160420061540469065%yocraigst@gmail.com>,
    Craig Stevenson <yocraigst@gmail.com> wrote:

    This has happened before, but this time I thought I'd ask for help...


    My normal prompt in Terminal is my user name folowed by a dollar sign.
    (My IP address is in there somewhere also). Every once in a while, and
    I've just done it now, I apparently type the wrong thing and the prompt changes to a ">". No words before it, nothing else, just that. Nothing
    I type at that point seems to have any effect except hitting "return"
    gives me a new line.

    What did I get myself into and how do I get out?

    Thanks!!

    (Yes, I'm going to get a book on all this stuff probably tomorrow)

    As has been said by others, it is most likely an incomplete
    command. Either a starting " or ' and not ending " or ', or the
    last character on the preceding line is a backslash (each to do as
    it is just above the return key; I do this fairly often).

    If > confuses you _AND_ you use bash, sh, ksh, zsh then set PS2 in
    your .bash_profile, .bashrc, or .profile.

    export PS1="Hay! The Command is not finished! Keep typing :-) "

    This should let you know very clearly that it is an unfinished
    command :-)

    Bob Harris
    --- Synchronet 3.18b-Win32 NewsLink 1.113
  • From void * clvrmnky()@clvrmnky.invalid@hotmail.com.invalid to comp.sys.mac.system on Tuesday, April 18, 2006 15:15:42
    From Newsgroup: comp.sys.mac.system

    Craig Stevenson wrote:
    This has happened before, but this time I thought I'd ask for help...


    My normal prompt in Terminal is my user name folowed by a dollar sign.
    (My IP address is in there somewhere also). Every once in a while, and
    I've just done it now, I apparently type the wrong thing and the prompt changes to a ">". No words before it, nothing else, just that. Nothing
    I type at that point seems to have any effect except hitting "return"
    gives me a new line.

    What did I get myself into and how do I get out?

    Thanks!!

    (Yes, I'm going to get a book on all this stuff probably tomorrow)

    What is "PS2" set to? I bet it is set to "> " and you've type some
    reserved words, a here doc or an unclosed quote before hitting return.
    --- Synchronet 3.18b-Win32 NewsLink 1.113
  • From Craig Stevenson@yocraigst@gmail.com to comp.sys.mac.system on Tuesday, April 18, 2006 18:53:45
    From Newsgroup: comp.sys.mac.system

    In article <yVa1g.18528$43.5895@nnrp.ca.mci.com!nnrp1.uunet.ca>, void * clvrmnky <clvrmnky.invalid@hotmail.com.invalid> wrote:

    What is "PS2" set to? I bet it is set to "> "

    and you've type some reserved words,

    a here doc

    or an unclosed quote before hitting return.
    This last one.
    --- Synchronet 3.18b-Win32 NewsLink 1.113