About 2,520,000 results
Open links in new tab
  1. 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" …

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

  3. What's the meaning of the parameter -e for bash shell command …

    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 …

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

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

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

  7. How do I get the directory where a Bash script is located from …

    How do I get the path of the directory in which a Bash script is located, inside that script? I want to use a Bash script as a launcher for another application. I want to change the working directo...

  8. Shell scripting: -z and -n options with if - Unix & Linux Stack …

    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 …

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

    #!/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.

  10. bash - How to escape single quotes within single quoted strings

    Aug 9, 2009 · Instead, try printf, or perhaps regular echo with Bash's $'c-style' strings which support basically the same escapes (so \047 encodes an escaped literal single quote).