About 2,440,000 results
Open links in new tab
  1. shell - Bash regex =~ operator - Stack Overflow

    What is the operator =~ called? I'm not sure it has a name. The bash documentation just calls it the =~ operator. Is it only used to compare the right side against the left side? The right side is considered …

  2. bash - What is the purpose of "&&" in a shell command? - Stack …

    Oct 27, 2021 · Furthermore, you also have || which is the logical or, and also ; which is just a separator which doesn't care what happend to the command before.

  3. bash - Shell equality operators (=, ==, -eq) - Stack Overflow

    If not quoted, it is a pattern match! (From the Bash man page: "Any part of the pattern may be quoted to force it to be matched as a string."). Here in Bash, the two statements yielding "yes" are pattern …

  4. How do I iterate over a range of numbers defined by variables in Bash?

    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?

  5. 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)?

  6. What's the meaning of the parameter -e for bash shell command line?

    123 I have as bash shell script with header #!/bin/bash -e. When I run the script, it will be interrupted after the grep command runs, but when I remove the parameter -e, then the script can be run …

  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 "Arithmetic …

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

    Feb 9, 2016 · A bash function has no line numbers related to the FILE that contains the definition. NOW: The code is stored somewhere internally in the running instance of Bash - does it REALLY require a …

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

    74 As per bash - The Set Builtin manual, if -e / errexit is set, the shell exits immediately if a pipeline consisting of a single simple command, a list or a compound command returns a non-zero status.

  10. Shell scripting: -z and -n options with if - Unix & Linux Stack Exchange

    Jan 16, 2014 · You can find a very nice reference for bash's [ aka test builtin's operators here, or by running help test in a bash shell or info bash test or info bash '[' from any shell¹. If you are using a …