About 2,440,000 results
Open links in new tab
  1. bash - What are the special dollar sign shell variables ... - Stack ...

    Sep 14, 2012 · In Bash, there appear to be several variables which hold special, consistently-meaning values. For instance, ./myprogram &; echo $! will return the PID of the process …

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

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

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

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

    Jan 30, 2017 · #!/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.

  6. How do I iterate over a range of numbers defined by variables in …

    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?

  7. What does the -e do in a bash shebang? - Unix & Linux Stack …

    All the bash command line switches are documented in man bash. -e Exit immediately if a pipeline (which may consist of a single simple command), a subshell command enclosed in …

  8. bash - How do I add environment variables? - Ask Ubuntu

    Aug 27, 2011 · To set an environment variable once, use the export command in the prompt, not in a shell script: $ export THEVAR=/example The variable will be set for the rest of the shell …

  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. How do I test if a variable is a number in Bash? - Stack Overflow

    Apr 30, 2009 · Bash does provide a reliable means of determining if a number is an INTEGER. { VAR="asdfas" ; ( ( VAR )) ; echo $?; } The equation will correctly fail if the answer is '0' …