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. An "and" operator for an "if" statement in Bash - Stack Overflow

    Modern shells such as Bash and Zsh have inherited this construct from Ksh, but it is not part of the POSIX specification. If you're in an environment where you have to be strictly POSIX compliant, stay …

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

  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. 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 …

  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. 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 …

  10. shell - Difference between sh and Bash - Stack Overflow

    When writing shell programs, we often use /bin/sh and /bin/bash. I usually use bash, but I don't know what's the difference between them. What's the main difference between Bash and sh? What do we ...