Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian User (http://www.linux-archive.org/debian-user/)
-   -   Mistype into shell.......... (http://www.linux-archive.org/debian-user/573099-mistype-into-shell.html)

Charlie 09-08-2011 05:59 AM

Mistype into shell..........
 
Something that happens occasionally, how do I get out of it without
killing the shell?

Sometimes I type something, slip and ahead of the command I type a
character accidentally like '.

The shell responds with >

I can type anything I want into that shell and it responds with >

How do I get out of that without killing the shell and bringing up a
new one?

Tia
Charlie
--
Registered Linux User:- 329524
***********************************************

The way in which men cling to old institutions after the life has
departed out of them, and out of themselves, reminds me of those
monkeys which cling by their tails -- aye, whose tails contract about
the limbs, even the dead limbs, of the forest, and they hang suspended
beyond the hunter's reach long after they are dead. It is of no use to
argue with such men. They have not an apprehensive intellect, but
merely, as it were a prehensile tail. ..........Henry David Thoreau

***********************************************

Debian GNU/Linux - just the best way to create magic

-----------------------------------------------------


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110908155925.33f8eec0@taowild">http://lists.debian.org/20110908155925.33f8eec0@taowild

Sven Joachim 09-08-2011 06:37 AM

Mistype into shell..........
 
On 2011-09-08 07:59 +0200, Charlie wrote:

> Something that happens occasionally, how do I get out of it without
> killing the shell?
>
> Sometimes I type something, slip and ahead of the command I type a
> character accidentally like '.
>
> The shell responds with >

It's called the PS2 prompt (consult your bash manual for details),
indicating that the command is incomplete and more input is needed (in
this case, the closing quote).

BTW, zsh is a bit smarter than bash here and indicates what type of
completion it wants:

,----
| % for file in /bin/true
| for> do
| for> echo "$file
| for dquote> " '
| for quote> foo'
| for> done
| /bin/true
|
| foo
`----

> I can type anything I want into that shell and it responds with >
>
> How do I get out of that without killing the shell and bringing up a
> new one?

Insert the closing quote to complete the command or type Ctrl-C to
cancel it.

Sven


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 87zkiffsjk.fsf@turtle.gmx.de">http://lists.debian.org/87zkiffsjk.fsf@turtle.gmx.de

Dirk Weinhardt 09-08-2011 06:38 AM

Mistype into shell..........
 
Sometimes I type something, slip and ahead of the command I type a
character accidentally like '.

The shell responds with>

I can type anything I want into that shell and it responds with>

How do I get out of that without killing the shell and bringing up a
new one?


Type another ' to close the string or hit CTRL-C. The same with double
quotes.


HTH.

Dirk


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4E6862DE.1030103@weinhardt.biz">http://lists.debian.org/4E6862DE.1030103@weinhardt.biz

Dom 09-08-2011 06:45 AM

Mistype into shell..........
 
On 08/09/11 06:59, Charlie wrote:


Something that happens occasionally, how do I get out of it without
killing the shell?

Sometimes I type something, slip and ahead of the command I type a
character accidentally like '.

The shell responds with>

I can type anything I want into that shell and it responds with>

How do I get out of that without killing the shell and bringing up a
new one?


Well, you have opened a quoted piece of text and the shell is waiting
for the closing ' character, so you could close it by typing another ',
but this may lead to something other than what you wished to happen.


Or you could just abandon the line with Ctrl-C.

--
Dom


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4E6864A3.2050002@rpdom.net">http://lists.debian.org/4E6864A3.2050002@rpdom.net

Charlie 09-08-2011 06:51 AM

Mistype into shell..........
 
On Thu, 08 Sep 2011 07:45:55 +0100 "Dom toyer@rpdom.net" suggested
this:

>On 08/09/11 06:59, Charlie wrote:
>>
>> Something that happens occasionally, how do I get out of it without
>> killing the shell?
>>
>> Sometimes I type something, slip and ahead of the command I type a
>> character accidentally like '.
>>
>> The shell responds with>
>>
>> I can type anything I want into that shell and it responds with>
>>
>> How do I get out of that without killing the shell and bringing up a
>> new one?
>
>Well, you have opened a quoted piece of text and the shell is waiting
>for the closing ' character, so you could close it by typing another
>', but this may lead to something other than what you wished to happen.
>
>Or you could just abandon the line with Ctrl-C.
>
>--
>Dom

Thank you Sven and Dom.

--
Registered Linux User:- 329524
***********************************************

Our truest life is when we are in our dreams awake. ......Henry David
Thoreau

***********************************************

Debian GNU/Linux - just the best way to create magic

-----------------------------------------------------


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110908165148.53b4cc4e@taowild">http://lists.debian.org/20110908165148.53b4cc4e@taowild

Charlie 09-08-2011 12:24 PM

Mistype into shell..........
 
On Thu, 08 Sep 2011 08:38:22 +0200 "Dirk Weinhardt
report01@weinhardt.biz" suggested this:

>> Sometimes I type something, slip and ahead of the command I type a
>> character accidentally like '.
>>
>> The shell responds with>
>>
>> I can type anything I want into that shell and it responds with>
>>
>> How do I get out of that without killing the shell and bringing up a
>> new one?
>
>Type another ' to close the string or hit CTRL-C. The same with double
>quotes.
>
>HTH.
>
>Dirk

Thanks Dirk, much appreciated.
--
Registered Linux User:- 329524
***********************************************

Man is the only animal for whom his own existence is a problem which he
has to solve. ....Erich Fromm

***********************************************

Debian GNU/Linux - just the best way to create magic

-----------------------------------------------------


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110908222407.7ef1da1f@taowild">http://lists.debian.org/20110908222407.7ef1da1f@taowild

jacques 09-08-2011 01:02 PM

Mistype into shell..........
 
Le 08/09/2011 07:59, Charlie a écrit :


I can type anything I want into that shell and it responds with>


You opened a string with ' then the shell expects another ' to close.

You need to close the string opened with ' by another '

$
$ blah '
>
'
$

Jacques


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4E68BCF4.20103@lavignotte.org">http://lists.debian.org/4E68BCF4.20103@lavignotte.org

Charlie 09-09-2011 12:23 AM

Mistype into shell..........
 
On Thu, 08 Sep 2011 15:02:44 +0200 "jacques jacques@lavignotte.org"
suggested this:

>Le 08/09/2011 07:59, Charlie a écrit :
>
>> I can type anything I want into that shell and it responds with>
>
>You opened a string with ' then the shell expects another ' to close.
>
>You need to close the string opened with ' by another '
>
>$
>$ blah '
> >
>'
>$
>
> Jacques

Thanks Jaques,

I tested it when I was first informed that was the solution and it
works. Also tested Ctrl + c and that works.

It will save me the "oh bugger" factor when I've done it in the past and
then trying keystrokes of all kinds and never the right ones to get me
back to the prompt. Then after some frustration finally killing the
shell and restarting another to do the work I wanted.

Thanks to everyone for your help.
Charlie
--
Registered Linux User:- 329524
***********************************************

Whether the flower looks better in the nosegay than in the meadow where
it grew and we had to wet our feet to get it! Is the scholastic air any
advantage? ....Henry David Thoreau

***********************************************

Debian GNU/Linux - just the best way to create magic

-----------------------------------------------------


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110909102333.2a366f0a@taowild">http://lists.debian.org/20110909102333.2a366f0a@taowild


All times are GMT. The time now is 10:33 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.