
Bash test: what does "=~" do? - Unix & Linux Stack Exchange
Jan 27, 2017 · I realize you said “read the bash man pages” but at first, I thought you meant read the man pages within bash. At any rate, man bash returns a huge file, which is 4139 lines (72 …
What's the difference between <<, <<< and < < in bash?
Sep 27, 2015 · What's the difference between <<, <<< and < < in bash?Here document << is known as here-document structure. You let the program know what will be the ending text, and …
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.
Shell scripting: -z and -n options with if - Unix & Linux Stack …
Jan 20, 2025 · You can find a very nice reference for bash's [ aka test builtin's operators here, or by running help test in a bash shell or info bash test or info bash '[' from any shell¹. If you are …
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 …
How do I create a permanent Bash alias? - Ask Ubuntu
Dec 15, 2010 · I would like to create an alias to rm command in order to have a confirmation message after executing this command. So I am creating an alias like this alias rm='rm -i'. But …
bash - What does $ (command) & do? - Ask Ubuntu
Oct 6, 2016 · Bash performs the expansion by executing the command in a subshell environment and replacing the command substitution with the standard output of the command, with any …
bash - sudo: source: command not found - Ask Ubuntu
The problem is that source is a bash build-in command (not a program - like ls or grep). I think one approach is to login as root and then execute the source command. sudo -s source …
bash - How do I remove a directory and all its contents? - Unix
Sep 25, 2025 · 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?
How can I pass a command line argument into a shell script?
Feb 10, 2012 · The shell command and any arguments to that command appear as numbered shell variables: $0 has the string value of the command itself, something like script, ./script, …