About 2,450,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. bash - How do I remove a directory and all its contents? - Unix

    In bash all I know is that rmdir directoryname will remove the directory but only if it's empty. Is there a way to force remove subdirectories?

  3. Where is .bash_profile? - Ask Ubuntu

    In any case, bash always supports tilde expansion and the point of .bash_profile is that only bash runs commands from it, so . ~/.profile is fine.) The . builtin sources a file, which is to say it runs …

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

  5. How to add newlines into variables in bash script

    In bash you can use the syntax str=$'Hello World\n===========\n' Single quotes preceded by a $ is a new syntax that allows to insert escape sequences in strings. Also printf builtin allows to …

  6. How can I shorten my command line (bash) prompt?

    How can I shorten my command line (bash) prompt? Ask Question Asked 13 years, 6 months ago Modified 2 years, 1 month ago

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

  8. In a bash script, using the conditional "or" in an "if" statement

    This question is a sequel of sorts to my earlier question. The users on this site kindly helped me determine how to write a bash for loop that iterates over string values. For example, suppose th...

  9. Bash remove first and last characters from a string

    Bash remove first and last characters from a string Ask Question Asked 13 years, 11 months ago Modified 6 years ago

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