About 2,430,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" are pattern …

  2. Difference between ${} and $() in Bash - Stack Overflow

    I have two questions and could use some help understanding them. What is the difference between ${} and $()? I understand that () means running command in separate shell and placing $ means passing...

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

  5. Understanding the "-p" option to "command" in Bash and its …

    Sep 5, 2020 · The command command in bash: Run command with arguments ignoring any shell function named command. The -p option means to use a default value of $PATH that is guaranteed …

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

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

  8. Elegant File String Search in Bash - Unix & Linux Stack Exchange

    Jun 9, 2025 · I want to search for a string in files located in a certain directory using a bash script. The line number is printed near each match and the filename is printed once at the start. find "$

  9. What do the arguments '-v' and '-x' mean to bash?

    From man bash (yes, it's a big man page, usually Google search is faster): -x After expanding each simple command, for command, case command, select command, or arithmetic for command, …

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