About 2,430,000 results
Open links in new tab
  1. shell - Difference between sh and Bash - Stack Overflow

    Bash shell is the default shell in most Linux distributions and substitute for the Sh shell (the Sh shell will also run in the Bash shell). The Bash shell can execute the vast majority of Sh shell …

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

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

    Oct 27, 2021 · 180 command-line - what is the purpose of &&? In shell, when you see $ command one && command two the intent is to execute the command that follows the && only if the first …

  5. shell - Bash regex =~ operator - Stack Overflow

    Oct 18, 2013 · The =~ operator is a regular expression match operator. This operator is inspired by Perl's use of the same operator for regular expression matching. The [[ ]] is treated …

  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. shell - Redirect stderr and stdout in Bash - Stack Overflow

    I want to redirect both standard output and standard error of a process to a single file. How do I do that in Bash?

  8. How to highlight bash/shell commands in markdown?

    Here shell is an alias for bash. Chroma has something called Session. Pygments (doc) uses console, shell-session for bash sessions, pwsh-session, ps1con for power shell sessions and …

  9. Loop through an array of strings in Bash? - Stack Overflow

    Jan 16, 2012 · 3+ Avoid bash loop when you can Here's a little sample: this script will recursively find all .png files in current directory, then list them with creation date, file size and picture …

  10. bash - How to represent multiple conditions in a shell if statement ...

    Sep 30, 2010 · Bash (see conditional expressions) seems to preempt the classic and POSIX meanings for -a and -o with its own alternative operators that take arguments. With some care, …