About 809,000 results
Open links in new tab
  1. bash - Shell equality operators (=, ==, -eq) - Stack Overflow

    $ [ 1 -eq 1 ]; echo $? 0 $ [ 1 -eq 2 ]; echo $? 1 $ test 1 -eq 1; echo $? 0 The == inside of single or double brackets (or the test command) is one of the string comparison operators:

  2. Comparing two files in Linux terminal - Stack Overflow

    Jan 24, 2013 · Comparing two files in Linux terminal Asked 12 years, 9 months ago Modified 1 year ago Viewed 485k times

  3. Linux shell programming string compare syntax - Stack Overflow

    Linux shell programming string compare syntax Asked 14 years, 6 months ago Modified 7 years, 11 months ago Viewed 87k times

  4. shell - How can I compare numbers in Bash? - Stack Overflow

    BTW, in bash a semi-colon is a statement separator, not a statement terminator, which is a new-line. So if you only have one statement on a line then the ; at end-of-line are superfluous. Not …

  5. How do I compare numbers in bash? - Unix & Linux Stack Exchange

    Jan 31, 2018 · Comparison operators within it act in a C-like manner, where 1 indicates a true result, and 0 indicates a false result (as opposed to usual shell way, where 0 is success and …

  6. How to compare strings in Bash - Stack Overflow

    Feb 10, 2010 · How do I compare a variable to a string (and do something if they match)?

  7. bash - Unix & Linux Stack Exchange

    In Bash, two integers can be compared using conditional expression arg1 OP arg2 OP is one of -eq, -ne, -lt, -le, -gt, or -ge. These arithmetic binary operators return true if arg1 is equal...

  8. linux - Comparison of content of two folders on remote cluster …

    Mar 17, 2025 · How i can be 100% sure that rsync was executed correctly and successfully finished (in particular that comparison was done for full content of the two mentioned above …

  9. linux - ksh + compare numbers – two ways - Stack Overflow

    the following example shows hot to compare numbers I give here two different ways one way with the ">" and "<" and second way with "-gt" or "-lt" both ways are work exactly so what the diffe...

  10. linux - Compare time using date command - Stack Overflow

    Sep 25, 2012 · Say I want a certain block of a bash script executed only if it is between 8 am (8:00) and 5 pm (17:00), and do nothing otherwise. The script is running continuously. So far I …