136

When I execute a script in a Linux shell, I get this output:

dquote>

What does this mean?

DimiDak
  • 4,820
  • 2
  • 26
  • 32
Leonardo
  • 1,501
  • 2
  • 9
  • 6

11 Answers11

174

It means you've executed a line of code with only one double-quote character, like this:

echo "Hello

The shell is waiting for the other quote.

RichieHindle
  • 272,464
  • 47
  • 358
  • 399
  • 3
    And I found that CTRL+G was the only way to undo my command. As entering " will execute something you maybe had mistyped. – Pierre Maoui Jun 27 '17 at 14:05
  • I was working in MobaXTerm w/ OhMyZSH shell and this worked perfectly for me. – Roralee Jun 29 '17 at 21:07
  • This worked for me. Just added one more " and pressed enter. – jimmyplaysdrums Jun 15 '19 at 00:39
  • 1
    This can also occur in those cases when you use two different type of quotation mark. Therefore it's worth to replace the quotation marks if you copied the command from somewhere else on the net. – Crepkey Sep 07 '21 at 06:45
  • 1
    @PierreMaoui - you should add your as a full-blown answer, as it's the safest way to get out of the situation, and it's easy to miss here in the comments. (And thanks for pointing it out - was exactly what I needed!) – Katie Byers Jan 21 '22 at 20:11
  • The mystery was why it was waiting for a second double quote. The solution was that I had cut and pasted the command from an e-mail, and some text editor had replaced the first double quote character with a Unicode double-backquote. These looked almost the same in my editor font. I noted this at the bottom, but I feel I should repeat it next to the most read comment, in case someone else falls down this hole. – Richard Kirk Jun 09 '22 at 17:45
  • which shortcut is there for AppleOS? – Samuel Jul 22 '22 at 13:22
52

If you have an ! in a quoted string like password="this1smyp4ssword!" it will also end with dquote>

Rico Neitzel
  • 1,086
  • 9
  • 9
17

When you have "dquote>" on terminal, do not worry just press double quotes button on keyboard for EXIT:

"

Screenshot example:

enter image description here

canerkaseler
  • 6,204
  • 45
  • 38
8

The shell is waiting for the other quote of an unfinished command.

CTRL+G will leave that state and undo the command.

Entering " and pressing enter is an other way to leave but it will execute something you may had mistyped.

Pierre Maoui
  • 5,976
  • 2
  • 27
  • 28
5

If we have an exclamation symbol in the password, for example like password="passwordhas!symbol" it will also end with dquote>

To get rid of dquote, use a single quote, as shown below. password='passwordhas!symbol'

3
dquote> 

The above prompt surely means that you have to de-quote the starting of the quote, i.e. ", with another quote: ".

Please write a letter i.e another: " in the dquote> prompt.

a stone arachnid
  • 1,272
  • 1
  • 15
  • 27
2

It might mean that you have escaped the ending double quotes while running the command. like:-

echo "Hello\"

So you need to provide one more double quote.

sunder
  • 968
  • 2
  • 11
  • 31
1

NB: check the double quotes in your line are ordinary ASCII double quotes.

I had a command cut from an e-mail, and was getting the 'dquote>' prompt. It turns out the text editors had replaced the final double quote with a double backquote, which can look almost identical. If in doubt, delete and retype all double quotes.

Richard Kirk
  • 281
  • 1
  • 12
1

You need to use a pair of double quotes in your text.

The shell is waiting for you to add a second double quote ", hence the prompt dquote>. Add and this prompt will go away.

The same applies for single quotes '

Oxkr
  • 11
  • 2
  • 2
    As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community May 03 '22 at 03:28
1

This just happened to me and when I typed " and pressed enter, it led to > being shown. If this happens to you, just press control-c

Nnamdi
  • 51
  • 5
-1

You need to use single quotes instead of double quotes and make sure they are closed.

"Hello" should be 'Hello'

'Hello should be 'Hello'

Chris Claude
  • 973
  • 12
  • 25
  • What do you mean by this? The OP hasn't shared anythign that contains quotes, and there are already other answers mentioning quotes. Please do not duplicate them, unless you want to share **new** insights – Nico Haase Apr 08 '23 at 11:40
  • @NicoHaase You misunderstood my answer. There's no answer that mentions you should use single quotes when double quotes are not working. In my case my double quotes matched but was still giving the issue. Changing them to single quotes worked – Chris Claude Apr 08 '23 at 12:03
  • Feel free to add all clarification to your answer by editing it. Using matchin pairs of quotes has already been recommended in the other answers. What do you want to add to them? – Nico Haase Apr 08 '23 at 18:17