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 7837135
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T14:28:47+00:00 2026-06-02T14:28:47+00:00

when i do: while [ $choice != ‘X’ ] do it works but when

  • 0

when i do:

while [ $choice != 'X' ]
do

it works but when i do

while [ $choice != 'x' ] || [ $choice != 'X' ]
do

none of them work.

Any idea?

  • 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-02T14:28:50+00:00Added an answer on June 2, 2026 at 2:28 pm

    man test

     EXPRESSION1 -o EXPRESSION2
          either EXPRESSION1 or EXPRESSION2 is true
    
     while [ $choice != 'x' -o $choice != 'X' ]
    

    Note that this expression is always true, do you want and: -a?

    If you replace || with && it will work too..

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

Sidebar

Related Questions

While I'm led to believe its likely just a design choice, is there any
When is a do-while the better choice over other types of loops? What are
While making my choice b/n Array and Arraycollection I get confused why whould I
So far I have written choice as a string but I need to write
views.py: while i<10: temp = random.choice(possible) token = token + temp i=i+1 userf.email_token =
While trying to use Facebook's mobile authentication, I realized that they don't set any
While designing my objects I find composition to be a better choice from the
contact entry = {, , , }; while (choice == 1 || 2 ||
while working in try-catch in came across this error. But I cant trace out
Why we can't use Choice.IMPLICIT with in a Form while we can use Choice.EXCLUSIVE

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.