About 2,560,000 results
Open links in new tab
  1. bash - What is the purpose of "&&" in a shell command? - Stack …

    Oct 27, 2021 · $ command one && command two the intent is to execute the command that follows the && only if the first command is successful. This is idiomatic of Posix shells, and not …

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

  3. arguments - What is $@ in Bash? - Stack Overflow

    Oct 10, 2010 · I reckon that the handle $@ in a shell script is an array of all arguments given to the script. Is this true? I ask because I normally use search engines to gather information, but I …

  4. 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 987k times

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

  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. linux - Is there a way to exit a Bash script, but not quitting the ...

    When I use exit command in a shell script, the script will terminate the terminal (the prompt). Is there a way to terminate a script and then staying in the terminal? My script run.sh is expected to

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

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