Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8062663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T10:44:42+00:00 2026-06-05T10:44:42+00:00

Executing queries in the JavaScript shell of Mongo feels a lot like executing commands

  • 0

Executing queries in the JavaScript shell of Mongo feels a lot like executing commands right in the bash shell. Because of this, my fingers keep trying to Ctrl+C my way out of a command that I want to “abort” and land back at the command prompt. Unfortunately, in the mongo shell at 2.0.4, when I Ctrl+C, it drops me out of the JavaScript shell, rather than just aborting the command and giving me the command prompt.

Is there a way in the JavaScript shell to abandon the current command without executing it and land back at the command prompt?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T10:44:44+00:00Added an answer on June 5, 2026 at 10:44 am

    What I’ve always naturally done is type a ( and then immediately hit enter three times. The shell will assume you are just hitting enter to break up your command, but if you hit enter 2 more times it will exit back to the shell. It’s wonky, but it works.


    Edit: Use ctrl+d, which “kills the shell” according to http://www.gotothings.com/unix/bash-hotkeys.htm. If you hit this once after hitting enter in the middle of typing a command in the mongo shell, it will exit your continuation and get you back to a clean mongo prompt. Hitting it twice will exit the mongo shell.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking for this information when executing queries: # Query_time: 11.639269 Lock_time: 0.000192 Rows_sent:
My model is below, when I call this two sql queries are executing one
Suppose I am executing several queries on the server using mysql_query . The results
I'm executing some complex queries in my app by hand via PDO, using $pdo
I'm running the following statement to see what queries are executing in sql server:
I've noticed that my code errors out on sqlWrite.ExecuteNonQuery(); after executing 200 Insert queries
Is there a way to preview queries in the Rails console without executing them?
Try executing the following in JavaScript: parseInt('01'); //equals 1 parseInt('02'); //equals 2 parseInt('03'); //equals
I am using OleDB for executing my queries in C#, Is there any way
Running KODO 4.2 and having an issue inefficient queries being generated by KODO. This

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.