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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T19:45:15+00:00 2026-06-02T19:45:15+00:00

The constructs -ne , -eq , and -gt looks at least strange. if ($true

  • 0

The constructs -ne, -eq, and -gt looks at least strange.

if ($true -eq $true){}

but not

if ($true = $true){}

What is the explanation?

  • 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-02T19:45:18+00:00Added an answer on June 2, 2026 at 7:45 pm

    Basically the answer is that it is how Unix has done it forever. Sure enough, if you write some Bash scripts that’s what you’ll use and it’s actually nice to have your PowerShell syntax knowledge transfer over one for one to Bash.

    It is answered in detail in Bruce Payette’s Windows PowerShell in Action, Second Edition (Kindle Location 3391).

    Let’s talk about the most contentious design decision in the
    PowerShell language.

    And the winner is: why the heck didn’t we use the conventional symbols for comparison like >, >=, <, <=, ==, and !=?

    The answer is that the > and < characters are used for output redirection. Because
    PowerShell is a shell and all shell languages in the last 30 years
    have used > and < for I/O redirection, people expected that PowerShell
    should do the same. During the first public beta of PowerShell, this
    topic generated discussions that went on for months.

    We looked at a
    variety of alternatives, such as modal parsing where sometimes > meant
    greater-than and sometimes it meant redirection. We looked at
    alternative character sequences for the operators like :> or ->,
    either for redirection or comparison. We did usability tests and held
    focus groups, and in the end, settled on what we had started with.

    The redirection operators are > and <, and the comparison operators are
    taken from the Unix test(1) command. We expect that, because these
    operators have a 30-year pedigree, they’re adequate and appropriate to
    use in PowerShell. (We also expect that people will continue to
    complain about this decision, though hopefully not for 30 more years.)

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

Sidebar

Related Questions

The WinForms GroupBox control doesn't support MouseMove (or at least, not consistently), and I
I am trying to construct a SpannableString such that it looks like this: Two
I am using the ObservableSortedDictionary from Dr. WPF. The constructor looks like this: public
I have a constructor that looks like this (in c++): Interpreter::Interpreter() { tempDat ==
If the constructor for Door looks like this: Door::Door(Doorknob doorknob) : m_doorknob(doorknob) { }
For some reason it looks like constructor delegation doesn't work in the following snippet:
Are these two constructs equivalent? char[] arr = new char[5]; for (char x :
The Grails framework has a lot of constructs/features that allows for adhering to the
Yes, two hated constructs combined . Is it as bad as it sounds or
I have created a Job Queue module that processes jobs and constructs social-network type

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.