Results 1 to 4 of 4
  1. #1

    Member Since
    Sep 30, 2012
    Terminal: stuck in a ">" line
    I've searched the web for an answer to this and all I get is manuals on how to use "VIM." I don't have that nor do I want it. Anyways, when I'm in Terminal typing commands, every now and then I may type something wrong and I'll be put on the next line down preceded by a ">" and am unable to get out of lines starting with ">" even if I hit enter. For a visual example:

    Last login: Sun Jun 30 18:22:37 on _______
    ___________:~ _____$ command command command blah blah
    > type something and hit enter
    > oh look another line why can't I exit this
    > exit
    > logout
    > oh that didn't work
    > etc.

    Anywho, I can exit this annoying ">" line by closing the Terminal window, but of course that terminates the running process and makes me retype everything I went through to return to that point. Perhaps there's a hotkey combination I'm unaware of that can exit the ">" lines. Thanks for reading!


  2. #2

    Member Since
    Sep 30, 2012

    Turns out skimming through other forums on mac-forums led me to a list of shortcuts, which (after trying them all) ONE did the trick!!! Ctrl-d is what I was looking for. Cheers!

  3. #3

    cradom's Avatar
    Member Since
    Feb 14, 2004
    Groves, Texas
    21in. iMac 10.11 --- HP Linux Mint 18
    Just so you know:
    CtrlC tells the terminal to send a SIGINT to the current foreground process, which by default translates into terminating the application. CtrlD tells the terminal that it should register a EOF on standard input, which bash interprets as a desire to exit.
    Depending on whats happening one or the other should work.

  4. #4

    Raz0rEdge's Avatar
    Member Since
    Jul 17, 2009
    27" i7 iMac, 15" Macbook Pro TB, 13" Macbook Air, iPhone 6S, iPod Nano 7th Gen
    Bash will give you that symbol if you enter a command that needs multiple arguments to succeed..on the other hand, if you put in the argument that causes the command to kick off, then you won't need to hit CTRL-d to break out of it..

    For example, if you do
    $ while [ 1 ];
    > do
    > echo "Hello"
    > sleep 1
    > done
    The 'done' here is the final keyword/argument to the 'while' command to get started, so I immediately start seeing my Hello message showing up one every second.

    When you use the history (up arrow) to see what command BASH executed, you see
    while [ 1 ]; do echo "Hello"; sleep 1; done
    On the other hand, a common use of this BASH tactic is to create a new file with something like
    $ cat > file.txt << EOF
    > This is line one
    > and line two
    > and so on
    > EOF
    The result of this is:
    $ cat file.txt
    This is line one
    and line two
    and so on

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 04-06-2013, 04:13 AM
  2. Mac Book Pro 13" "No Line In"
    By Mad Jon in forum Switcher Hangout
    Replies: 7
    Last Post: 05-25-2012, 08:43 AM
  3. I thought I was supposed to have a "Line Out" audio output option on my MBP
    By VegasGeorge in forum Music, Audio, and Podcasting
    Replies: 2
    Last Post: 11-21-2009, 11:48 PM
  4. open "Get Info" window from the command line?
    By pjungwir in forum macOS - Operating System
    Replies: 2
    Last Post: 05-16-2008, 12:55 PM
  5. Replies: 2
    Last Post: 02-21-2005, 07:08 AM

Posting Permissions

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