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

    It depends on the Test Construct around the operator. Your options are double parentheses, double brackets, single brackets, or test. If you use ((…)), you are testing arithmetic equality …

  2. What do the -n and -a options do in a bash if statement?

    The switches -a and -n are not strictly part of a bash if statement in that the if command does not process these switches. What are primaries? I call them "switches", but the bash …

  3. An "and" operator for an "if" statement in Bash - Stack Overflow

    An "and" operator for an "if" statement in Bash Asked 12 years, 11 months ago Modified 1 year, 3 months ago Viewed 988k times

  4. sh - [: missing `]' in bash script - Stack Overflow

    Feb 9, 2016 · The double-brace keyword is a bash expression, and will not work with other POSIX shells, but it has some benefits, as well, such as being able to do these kinds of operations …

  5. How do I iterate over a range of numbers defined by variables in …

    Oct 4, 2008 · Related discusions: bash for loop: a range of numbers and unix.stackexchange.com - In bash, is it possible to use an integer variable in the loop control of a for loop?

  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. syntax - Ternary operator (?:) in Bash - Stack Overflow

    @dutCh's answer shows that bash does have something similar to the "ternary operator" however in bash this is called the "conditional operator" expr?expr:expr (see man bash goto section …

  8. How to increment a variable in bash? - Ask Ubuntu

    Jan 30, 2017 · #!/bin/bash # To focus exclusively on the performance of each type of increment # statement, we should exclude bash performing while loops from the # performance measure.

  9. What does 'set -e' mean in a Bash script? - Stack Overflow

    By default, Bash does not do this. This default behavior is exactly what you want if you are using Bash on the command line you don't want a typo to log you out! But in a script, you really want …

  10. bash - When do we need curly braces around shell variables?

    bash shell syntax curly-braces variable-expansion edited Sep 30, 2022 at 17:10 codeforester 43.8k 21 122 159