Gang Of Coders
Home
About Us
Contact Us
All Bash Solutions on Gang of Coders
Total of 1837 Bash Solutions
How can I get the source directory of a Bash script from within the script itself?
Bash
Directory
How can I check if a directory exists in a Bash shell script?
Bash
Shell
Unix
Posix
What is the preferred Bash shebang?
Bash
Shebang
How to redirect output to a file and stdout
Linux
Bash
File Io
Io
Stdout
How to count lines in a document?
Linux
Bash
Command Line
Scripting
YYYY-MM-DD format date in shell script
Bash
Shell
Date
Strftime
How can I use ":" as an AWK field separator?
Bash
Awk
Repeat command automatically in Linux
Linux
Bash
Ubuntu
Which shell I am using in mac
Bash
Macos
Shell
Unix
Zsh
sh command: exec 2>&1
Bash
Shell
Exec
How to split a line into words separated by one or more spaces in bash?
Bash
How to kill all subprocesses of shell?
Bash
Shell
Process
Fork
Kill
Extract string from string using RegEx in the Terminal
Regex
Bash
Grep
Git log tabular formatting
Git
Bash
Scripting
How to pass an associative array as argument to a function in Bash?
Arrays
Bash
Associative Array
Associative
How to programmatically determine the current checked out Git branch
Git
Bash
Shell
How can I shortern my command line prompt's current directory?
Bash
String
Path
Ps1
How do I count the number of rows and columns in a file using bash?
Bash
Row
How can I detect whether a symlink is broken in Bash?
Bash
Symlink
Mac OS: /usr/bin/env: bad interpreter: Operation not permitted
Macos
Perl
Bash
Command Line-Interface
Env
Find files of specified size using bash in Unix
Bash
Unix
On bash command-line, how to delete all letters before cursor?
Bash
Command Line
How to write a bash script to set global environment variable?
Bash
Shell
Environment Variables
how to read file from line x to the end of a file in bash
Bash
Creating tar file and naming by current date
Bash
How to run nohup and write its pid file in a single bash statement
Linux
Bash
How to replace spaces in file names using a bash script
Linux
Bash
Whitespace
Filenames
How can I print each command before executing?
Bash
Execute bash command in Node.js and get exit code
node.js
Bash
Exit Code
How to change default directory in Bash for Windows 10?
Windows
Bash
How to turn off the pager for AWS CLI return value?
Bash
Amazon Web-Services
Amazon Sqs
Aws Cli
What is the Unix command to create a hardlink to a directory in OS X?
Macos
Bash
Filesystems
Unix
Ln
Why can't I use job control in a bash script?
Bash
Job Control
Modify config file using bash script
Bash
Configuration Files
How to run a bash script from a Makefile?
Bash
Makefile
How can I pass a file argument to my bash script using a Terminal command in Linux?
Linux
Bash
Shell
Command Line
Terminal
How do I get just real time value from 'time' command?
Bash
Scripting
Shell
Convert absolute path into relative path given a current directory using Bash
Bash
Shell
Path
Relative Path
Absolute Path
Installing Homebrew on macOS
Macos
Bash
Installation
Homebrew
Clone private git repo with dockerfile
Bash
Git
Docker
Use GNU find to show only the leaf directories
Bash
Shell
Find
Gnu
How to provide password to a command that prompts for one in bash?
Bash
Unix
Passwords
How do I break up an extremely long string literal in bash?
Linux
Bash
How to check the validity of a remote git repository URL?
Git
Bash
Url
Curl
Github
How to store directory files listing into an array?
Bash
Shell
Grab the filename in Unix out of full path
Bash
Shell
Unix
Ksh
Removing part of a filename for multiple files on Linux
Linux
Bash
Shell
How to reverse array in bash onliner FOR loop?
Bash
compare content of two variables in bash
Bash
Diff
Fastest way to ping a network range and return responsive hosts?
Linux
Performance
Bash
Networking
Ping
How to count number of words from String using shell
Bash
Using getopts inside a Bash function
Bash
Function
Getopts
How does one output bold text in Bash?
Bash
Console
Formatting
Echo
Install MySQL on Ubuntu without a password prompt
Mysql
Bash
Ubuntu
Apt
Pass a password to ssh in pure bash
Linux
Bash
Pipe
Is the behavior behind the Shellshock vulnerability in Bash documented or at all intentional?
Bash
Function
Security
Environment Variables
Shellshock Bash-Bug
How to tail all lines except first row
Linux
Bash
OpenVPN on Linux: passing username and password in command line
Linux
Bash
Command
Echo
How can I run a Windows executable from WSL (Ubuntu) Bash
Linux
Windows
Bash
Ubuntu
Windows Subsystem-for-Linux
Forking / Multi-Threaded Processes | Bash
Bash
Shell
Fork
Why aliases in a non-interactive Bash shell do not work
Bash
Alias
Non Interactive
Shopt
How can I repeat a character in Bash?
Bash
Shell
Echo
Simple logical operators in Bash
Bash
Logical Operators
How to pass parameters to a Bash script?
Linux
Bash
Shell
Sending HTML mail using a shell script
Html
Linux
Email
Bash
Sendmail
Iterate through parameters skipping the first
Bash
/bin/sh: Syntax error: Unterminated quoted string
Bash
Ubuntu
Use sed to replace all backslashes with forward slashes
Bash
Shell
Sed
grep: group capturing
Regex
Linux
Bash
Grep
How do I change the default virtualenv prompt?
Python
Bash
Virtualenv
Command Prompt
Virtualenvwrapper
Windows PATH to posix path conversion in bash
Windows
String
Bash
Path
Msys
Floating point results in Bash integer division
Bash
Bc
Is there a grep equivalent for find's -print0 and xargs's -0 switches?
Bash
Unix
Grep
Find
Xargs
Run git pull over all subdirectories
Git
Bash
"unary operator expected" error in Bash if condition
Bash
Shell
How can you run a command in bash over and over until success?
Bash
Command
While Loop
How to match digits in regex in bash script
Regex
Bash
Check if a user is in a group
Bash
Is there a list of 'if' switches anywhere?
Bash
If Statement
Switch Statement
Shell Exec
Multiple strings, Truncate line at 80 characters
String
Bash
Awk
How to add a line in sed if not match is found
Bash
Sed
mvn command not found in OSX Mavrerick
Macos
Bash
Maven
Terminal
Pass command line arguments via sbatch
Bash
Shell
Unix
Slurm
cURL with a PKCS#12 certificate in a bash script
Bash
Curl
Openssl
Pkcs12
Bash command to check if Oracle or OpenJDK java version is installed on Linux
Java
Linux
Bash
Dockerfile CMD instruction will exit the container just after running it
Bash
Shell
Docker
Sh
Dockerfile
The return code from 'grep' is not as expected on Linux
Linux
Bash
Shell
Grep
Jenkins pipeline sh fail with "cannot run program nohup" on windows
Bash
Jenkins
Windows 10
Jenkins Pipeline
Run multiple curl commands in parallel
Bash
Shell
Curl
Passing arguments by reference
Bash
Shell
Scripting
Pass by-Reference
How to create User/Database in script for Docker Postgres
Bash
Postgresql
Docker
Dockerhub
How can I replace multiple empty lines with a single empty line in bash?
Regex
Bash
Automatically remove *.pyc files and otherwise-empty directories when I check out a new branch
Git
Python
Bash
How to programmatically determine whether the Git checkout is a tag and if so, what is the tag name
Git
Bash
Shell
Pass bash script parameters to sub-process unchanged
Bash
Scripting
Parameters
How can I replace ALL instances of a string in the previous command in Bash?
Bash
What are the PowerShell equivalents of Bash's && and || operators?
Bash
Powershell
Language Comparisons
Unable to set variables in bash script
Bash
Scripting
Can I run 'su' in the middle of a bash script?
Bash
Shell
Gzip with all cores
Linux
Bash
Gzip
Differences between declare, typeset and local variable in Bash
Bash
Shell
Variables
Scope
Declare
How to trap exit code in Bash script
Bash
Signals
Exit Code
Bash Trap
How do I deal with a filename that starts with the hyphen (-) character?
Linux
Bash
Ascii/Hex convert in bash
Bash
Ascii
Hex
How can I make a progress bar while copying a directory with cp?
Bash
Progress Bar
Cp
How to split a list by comma not space
Linux
Bash
Shell
Csv
Split
Get the exit code for a command in Bash and KornShell (ksh)
Bash
Unix
Ksh
Exit
Is it possible to get the function name in function body?
Bash
Shell
Regular expressions in a Bash case statement
Regex
Bash
Case
Glob
Bash: wait with timeout
Linux
Bash
Shell
Timeout
Waitpid
how to calculate the minimum of two variables simply in bash?
Bash
Logical Operators
How do I syntax check a Bash script without running it?
Linux
Bash
Unix
Syntax
Gnu
How can I detect if my shell script is running through a pipe?
Bash
Shell
Pipe
What is the difference between $(command) and `command` in shell programming?
Bash
Shell
Ksh
Sh
Using the "alternate screen" in a bash script
Linux
Bash
Terminal
Terminfo
Array of arrays in bash
Arrays
Bash
Shell
Insert lines in a file starting from a specific line
Bash
Sed
How can I scp a file with a colon in the file name?
Bash
Escaping
Scp
How to perform a for-each loop over all the files under a specified path?
Linux
Bash
Shell
python - os.getenv and os.environ don't see environment variables of my bash shell
Python
Bash
Environment Variables
Pythonpath
Use curl to download a Dropbox folder via shared link (not public link)
Macos
Bash
Unix
Curl
Dropbox
Error with gradlew: /usr/bin/env: bash: No such file or directory
Linux
Git
Bash
Gradlew
Replace slash in Bash
Regex
Linux
Bash
Tr
Slash
How to convert a JSON object to key=value format in jq?
Json
Bash
Jq
List file using ls command in Linux with full path
Linux
Bash
Shell
Command Line
Lua
passing arguments to jq filter
Json
Bash
Parameter Passing
Jq
Using curl in a bash script and getting curl: (3) Illegal characters found in URL
Linux
Bash
Curl
Awk
How do I use a regex in a shell script?
Regex
Bash
Shell
How can I 'echo' out things without a newline?
Bash
How to split one string into multiple strings separated by at least one space in bash shell?
Bash
Shell
String
Split
What is $@ in Bash?
Bash
Arguments
Best way to choose a random file from a directory in a shell script
Bash
File
Shell
Random
How do I create a directory on remote host if it doesn't exist without ssh-ing in?
Bash
Scripting
Scp
How do I Remove Specific Characters From File Names Using BASH
Bash
Uppercasing First Letter of Words Using SED
Linux
Bash
Unix
Awk
Sed
What does "< <(command args)" mean in the shell?
Bash
Shell
Built In
What is the reason for the weird syntax of the "case" statement in a bash/zsh script?
Bash
Shell
Case
Zsh
Passing parameters to a Bash function
Bash
Function
Parameters
Arguments
How can I declare and use Boolean variables in a shell script?
Bash
Shell
Scripting
Boolean
Sh
How to escape single quotes within single quoted strings
Bash
Syntax
Quoting
Check if a string matches a regex in Bash script
Regex
Bash
Shell
Scripting
How do I print some text in bash and pad it with spaces to a certain width?
Bash
Variables
Printing
Formatting
Printf
less-style markdown viewer for UNIX systems
node.js
Bash
Unix
Markdown
Less Unix
Escaping git bash after reflog, or commit, etc
Git
Bash
How to make an Echo server with Bash?
Bash
Tcp
Netcat
Splitting a file in linux based on content
Linux
File
Bash
Sed
Awk
find -name "*.xyz" -o -name "*.abc" -exec to Execute on all found files, not just the last suffix specified
Linux
Bash
Shell
Scripting
What is the proper way to detect shell exit code when errexit option is set?
Bash
Shell
Can not activate a virtualenv in GIT bash mingw32 for Windows
Python
Git
Bash
Virtualenv
Git Bash
Bash - variable variables
Bash
Variables
Is there a way to make bash job control quiet?
Bash
Shell
Unix
Parallel Processing
How can I set up autocompletion for Git commands?
Linux
Git
Bash
Debian
How do I change the extension of many files in a directory?
Bash
Powershell
Cmd
Why doesn't my terminal output unicode characters properly?
Bash
Shell
Command Line
Console
Terminal
bash command spanning multiple lines with several lines of comments in-between
Bash
Need to assign the contents of a text file to a variable in a bash script
Bash
Concatenating variables in Bash
Bash
Shell
String Concatenation
Custom tab completion in python argparse
Python
Bash
Command Line-Interface
Argparse
Tab Completion
Symlink broken right after creation
Bash
Relative Path
Symlink
Absolute Path
Get the name of the caller script in bash script
Bash
Shell
Incrementing a variable inside a Bash loop
Bash
Shell
Loops
Value too great for base (error token is "09")
Bash
How can I download a file from Heroku bash?
Bash
Heroku
Add new line character at the end of file in bash
Bash
File
Command
Newline
How to read from a file or standard input in Bash
Bash
Stdin
How to detect if a script is being sourced
Bash
Ksh
How to find whether or not a variable is empty in Bash
Bash
Shell
Is Empty
What is the meaning of a double dollar sign in bash/Makefile?
Linux
Bash
Makefile
Can $() always replace backticks for command substitution?
Bash
Syntax
CURL escape single quote
Bash
Shell
Curl
Elasticsearch
Gradle home cannot be found on Mac
Java
Bash
Macos
Gradle
Functions in Makefile
Bash
Function
Makefile
Gnu Make
How to find ports opened by process ID in Linux?
Linux
Bash
Networking
ssh command execution doesn't consider .bashrc | .bash_login | .ssh/rc?
Bash
Ssh
How do I use floating-point arithmetic in bash?
Bash
Floating Point
Arithmetic Expressions
Find the files existing in one directory but not in the other
Linux
Bash
Diff
Passing second argument onwards from a shell script to Java
Bash
Why C-forkbombs don't work like bash ones?
C++
C
Linux
Bash
Fork
Linux: remove file extensions for multiple files
Linux
Bash
Rename
Get autocompletion when invoking a "read" inside a Bash script
Bash
Bash Completion
How to start multiple processes in Bash
Bash
How to append a string to each element of a Bash array?
Arrays
Bash
Detect if executable file is on user's PATH
Bash
How do I properly escape data for a Makefile?
Bash
Makefile
Escaping
Fuzzy file search in linux console
Linux
Bash
File Search
How to copy multiple files from a different directory using cp?
Linux
Bash
Cp
How to convert ISO8859-15 to UTF8?
Linux
Bash
Text
How to extract last part of string in bash?
String
Bash
Awk
Renaming files in a folder to sequential numbers
Bash
Rename
Batch Rename
Get last dirname/filename in a file path argument in Bash
Linux
Bash
Shell
Svn
What does $@ mean in a shell script?
Linux
Bash
Shell
Unix
Sh
How can I ssh directly to a particular directory?
Bash
Shell
Scripting
Ssh
linux script to kill java process
Linux
Bash
Kill Process
Test if a directory is writable by a given UID?
Bash
Directory
File Permissions
`os.symlink` vs `ln -s`
Python
Linux
Bash
Symlink
Bash - Return value from subscript to parent script
Bash
What does double slash // in `cd //` mean in Linux?
Linux
Bash
Shell
Directory Structure
Cd
List public IP addresses of EC2 instances
Bash
Amazon Web-Services
Amazon Ec2
Aws Cli
Jq
Git for Windows doesn't execute my .bashrc file
Windows
Git
Bash
Windows 7
AWS S3: How to check if a file exists in a bucket using bash
Bash
Amazon Web-Services
Amazon S3
Select unique or distinct values from a list in UNIX shell script
Bash
Unique
Distinct
Ksh
Sh
What is a unix command for deleting the first N characters of a line?
Bash
Unix
Command
Truncate
Test whether a glob has any matches in Bash
Bash
Glob
How to set uid and gid in Docker Compose?
Bash
Shell
Docker
Docker Compose
Store mysql query output into a shell variable
Mysql
Sql
Bash
Scripting
How to get the total physical memory in Bash to assign it to a variable?
Bash
How to extract domain name from url?
Regex
Bash
Url
Equivalent of __FILE__ and __LINE__ in Bash
Bash
Error Handling
Environment Variables
In Bash, how do I safely determine what a soft link points to?
Bash
Symlink
Print array elements on separate lines in Bash?
Arrays
Bash
VSCode Change Default Terminal
Bash
Powershell
Cmd
Terminal
Visual Studio-Code
What's the difference between "env" and "set" (on Mac OS X or Linux)?
Linux
Bash
Macos
Environment Variables
How do I use sed to change my configuration files, with flexible keys and values?
Linux
Bash
Sed
Jekyll - command not found
Ruby
Bash
Jekyll
Concat strings in a shell script
Bash
String Concatenation
Can an Xcode .mobileprovision file be 'installed' from the command line?
Ios
Bash
Xcodebuild
Xcrun
Optional option argument with getopts
Bash
Getopt
Getopts
Output JSON from Bash script
Json
Bash
In bash, how to store a return value in a variable?
Linux
Bash
Check whether one number equals another number in Bash
Bash
Why would I not leave extglob enabled in bash?
Bash
Bash: Inserting a line in a file at a specific location
Linux
Bash
How to write multiple line string using Bash with variables?
Linux
Bash
Bash4
Copy files from one directory into an existing directory
Bash
File
Directory
Copy
Cp
Counting open files per process
Linux
Bash
Ps
Get Day Of Week in bash script
Bash
Sed
Modify Bash prompt prefix in OS X terminal
Bash
Macos
Terminal
What does '\K' mean in this regex?
Regex
Bash
Grep
Quick ls command
Bash
Unix
Command
Ls
Prevent duplicates from being saved in bash history
Bash
Command Line
Cygwin
History
How to assign a glob expression to a variable in a Bash script?
Bash
Glob
if arguments is equal to this string, define a variable like this string
Bash
Scripting
Arguments
What's the difference between nohup and ampersand
Linux
Bash
Nohup
How to count items in JSON object using command line?
Json
Bash
Curl
Jq
Capistrano & Bash: ignore command exit status
Ruby on-Rails
Ruby
Bash
Capistrano
how to detect a build error from ant/maven via a bash script?
Bash
Maven 2
Ant
Scripting
Post Commit Hook Not Running
Git
Bash
Github
Post Commit
Githooks
How do I add a line of text to the middle of a file using bash?
Linux
Bash
Sed
Awk
Grep
Strange behavior of vim color inside screen with 256 colors
Bash
Vim
Colors
Terminal
Gnu Screen
accessing ERRORLEVEL from bash script
Bash
Cmd
Errorlevel
In Bash, how to find the lowest-numbered unused file descriptor?
Bash
File Io
Count occurrences of character per line/field on Unix
Linux
Bash
Shell
Unix
Scripting
Bash conditionals: how to "and" expressions? (if [ ! -z $VAR && -e $VAR ])
Bash
Shell
Can I change the name of `nohup.out`?
Bash
Logging
Nohup
Getting the parent of a directory in Bash
Bash
Directory
Dirname
How to use a variable's value as another variable's name in bash
Bash
Removing leading zeros before passing a shell variable to another command
Bash
Strip
Convert string to date in bash
String
Bash
Shell
Unix
Date
bash getopts with multiple and mandatory options
Bash
Getopts
Converting a Bash array into a delimited string
Arrays
String
Bash
Csv
Can I use awk to convert all the lower-case letters into upper-case?
Linux
Bash
Awk
In reverse-i-search (Ctrl+R ) ,Any method to switch between similar commands in history
Linux
Bash
Command Line
How to find/replace and increment a matched number with sed/awk?
Bash
Sed
Awk
Bash integer comparison
Bash
Comparison
Integer
Bash capturing output of awk into array
Linux
Arrays
Bash
Execute multiple commands in a bash script sequentially and fail if at least one of them fails
Bash
Number of non repeating lines - unique count
Bash
Shell
Line
Unique
postgresql: .pgpass not working
Bash
Postgresql
Database Backups
How to run bash commands in gulp?
Bash
Gulp
Remove all special characters and case from string in bash
Regex
Linux
Bash
Shell
Parsing
What does IFS= do in this bash loop: `cat file | while IFS= read -r line; do ... done`
Bash
Ifs
How to check if multiple variables are defined or not in bash
Bash
Shell
what does 'cd $_' mean?
Bash
Should I use quotes in environment path names?
Bash
Shell
Dotfiles
Disable wrapping in Psql output
Bash
Postgresql
Psql
What does 2 commas after variable name mean in bash?
Linux
Bash
Shell
Using jq with bash to run command for each object in array
Bash
Jq
Cannot connect to the Docker daemon on bash on Ubuntu windows
Bash
Docker
Windows Subsystem-for-Linux
Pipe to/from the clipboard in a Bash script
Linux
Bash
Macos
Clipboard
How to trim whitespace from a Bash variable?
String
Bash
Variables
Trim
How can I pipe stderr, and not stdout?
Bash
Grep
Stdout
Pipe
Stderr
Listing only directories using ls in Bash?
Bash
Directory
Ls
Replace one substring for another string in shell script
Bash
Shell
How do I write a bash script to restart a process if it dies?
Linux
Bash
Cron
Scripting
Error handling in Bash
Bash
Error Handling
Scripting
Error Logging
How to use 'find' to search for files created on a specific date?
Bash
Unix
Find
Replace one character with another in Bash
String
Bash
Replace
Sorting data based on second column of a file
Bash
Shell
Unix
How to pipe stdout while keeping it on screen ? (and not to a output file)
Bash
Shell
Pipe
Output
Stdout
How can I convert tabs to spaces in every file of a directory?
Bash
Shell
Unix
Spaces
In Place
How to exit if a command failed?
Linux
Bash
Exit
Exitstatus
How do I run a shell script without using "sh" or "bash" commands?
Bash
Shell
Alias
Sh
Error when using 'sed' with 'find' command on OS X: "invalid command code ."
Bash
Macos
Sed
Find
"find: paths must precede expression:" How do I specify a recursive search that also finds files in the current directory?
Linux
Bash
Find
How to calculate time elapsed in bash script?
Bash
Date
Pass ALL Arguments from Bash Script to Another Command
Bash
Scripting
Parameter Passing
Command Line-Arguments
How to insert a text at the beginning of a file?
Linux
Bash
Sed
Best way to simulate "group by" from bash?
Bash
Scripting
Switching from zsh to bash on OS X, and back again?
Bash
Terminal
Zsh
Bash: Strip trailing linebreak from output
Bash
Newline
Line Breaks
Bash: If/Else statement in one line
Bash
How to list running screen sessions?
Linux
Bash
Command Line
Gnu Screen
How to simulate the environment cron executes a script with?
Bash
Scripting
Cron
Returning a boolean from a Bash function
Bash
Shell
Boolean
Save file to specific folder with curl command
Bash
Shell
Curl
Directory
How can I check if a package is installed and install it if not?
Bash
Apt Get
How do I list the functions defined in my shell?
Bash
Shell
Function
Unix
How to recursively find the latest modified file in a directory?
Bash
Filesystems
Find
Checking Bash exit status of several commands efficiently
Bash
Exit
How to get the process ID to kill a nohup process?
Linux
Bash
Grep
Nohup
Why is #!/usr/bin/env bash superior to #!/bin/bash?
Bash
Shebang
How do I read the first line of a file using cat?
Bash
File Io
Cat
Which characters need to be escaped when using Bash?
Bash
Shell
Unix
Escaping
Special Characters
How to reload .bash_profile from the command line?
Bash
Shell
Command Line
Parsing JSON with Unix tools
Json
Bash
Parsing
How to echo shell commands as they are executed
Bash
Shell
Sh
Posix
Trace
Defining a variable with or without export
Linux
Bash
Shell
How to compare strings in Bash
String
Bash
Propagate all arguments in a bash shell script
Bash
Command Line-Arguments
How to create a temporary directory?
Bash
Temporary Directory
An "and" operator for an "if" statement in Bash
Bash
If Statement
How to sort a file in-place?
Linux
Bash
Shell
Unix
In Bash, how to add "Are you sure [Y/n]" to any command or alias?
Bash
Alias
Confirmation
How to place the ~/.composer/vendor/bin directory in your PATH?
Laravel
Bash
Ubuntu
Directory
Path
Git doesn't work on MacOS Catalina: "xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing"
Bash
Git
Macos
Zsh
Macos Catalina
What is the Linux equivalent to DOS pause?
Linux
Bash
Shell
Multiple commands in an alias for bash
Bash
Configuration
Is there a "goto" statement in bash?
Linux
Bash
Shell
Goto
Meaning of "[: too many arguments" error from if [] (square brackets)
Bash
If Statement
Arguments
How do you echo a 4-digit Unicode character in Bash?
Bash
Shell
Unicode
Character Encoding
How do you normalize a file path in Bash?
Linux
Bash
Unix
Shell
find: missing argument to -exec
Bash
Shell
Find
Arguments
Exec
How to check if a file is empty in Bash?
Linux
Bash
Unix
File Handling
Is Empty
Reading a space-delimited string into an array in Bash
Arrays
String
Bash
Shell
How to iterate over arguments in a Bash script
Bash
Command Line
Assigning default values to shell variables with a single command in bash
Bash
Shell
How to redirect output of an entire shell script within the script itself?
Bash
Shell
Sh
What is the best practice for dealing with passwords in git repositories?
Git
Bash
Security
Github
Passwords
How can I use Bash syntax in Makefile targets?
Bash
Shell
Makefile
How can I convert a series of images to a PDF from the command line on linux?
Image
Bash
Pdf
When should I wrap quotes around a shell variable?
Linux
Bash
Shell
Unix
Quotes
Command to get nth line of STDOUT
Bash
Shell
Sed
Stdout
Random number from a range in a Bash Script
Bash
Shell
Scripting
How to check if a symlink exists
Bash
Symlink
How do I edit $PATH (.bash_profile) on OS X?
Bash
Macos
Terminal
Path
Osx Yosemite
Read a variable in bash with a default value
Bash
Shell
How to get Maven project version to the bash command line
Bash
Command Line
Maven 2
A variable modified inside a while loop is not remembered
Bash
While Loop
Scope
Sh
How to run Conda?
Python
Bash
Anaconda
Conda
Correct Bash and shell script variable capitalization
Bash
Shell
Scripting
Naming Conventions
Capitalization
Ubuntu says "bash: ./program Permission denied"
Bash
Shell
Sh
How to evaluate http response codes from bash/shell script?
Http
Bash
Shell
Http Headers
redirect COPY of stdout to log file from within bash script itself
Bash
Shell
Redirect
Logging
Subtract two variables in Bash
Bash
Shell
Unix
Execute a command without keeping it in history
Linux
Bash
Unix
What command means "do nothing" in a conditional in Bash?
Bash
Conditional
Noop
standard_init_linux.go:178: exec user process caused "exec format error"
Python
Linux
Bash
Docker
How do I redirect output to a variable in shell?
Bash
Shell
Looping over arrays, printing both index and value
Bash
How to ignore xargs commands if stdin input is empty?
Bash
Centos
Xargs
Is there a bash command which counts files?
Bash
Read lines from a file into a Bash array
Arrays
Bash
Repeatedly run a shell command until it fails?
Bash
How to redirect the output of the time command to a file in Linux?
Linux
Bash
Time
How to apply shell command to each line of a command output?
Bash
How do I run multiple background commands in bash in a single line?
Linux
Bash
Shell
How do I negate a test with regular expressions in a bash script?
Regex
Bash
Conditional
Negate
`date` command on OS X doesn't have ISO 8601 `-I` option?
Bash
Macos
Iso8601
How to resolve symbolic links in a shell script
Bash
Shell
Scripting
Symlink
How to implement common bash idioms in Python?
Python
Bash
Shell
How do I put an already-running process under nohup?
Bash
Shell
Job Scheduling
Nohup
Interruption
How do I clear/delete the current line in terminal?
Bash
Terminal
How do I use sudo to redirect output to a location I don't have permission to write to?
Linux
Bash
Permissions
Sudo
Io Redirection
How to permanently set $PATH on Linux/Unix
Linux
Bash
Unix
Path
Zsh
Get current directory name (without full path) in a Bash script
Bash
Shell
Using variables inside a bash heredoc
Bash
Variables
Sh
Heredoc
Copy Paste in Bash on Ubuntu on Windows
Bash
Ubuntu
Command Line
Windows 10
Windows Subsystem-for-Linux
How to get overall CPU usage (e.g. 57%) on Linux
Linux
Bash
Unix
Cpu
Pass all variables from one shell script to another?
Bash
Shell
Unable to forward search Bash history similarly as with CTRL-r
Bash
Search
[ :Unexpected operator in shell programming
Linux
Bash
Shell
Delete all lines beginning with a # from a file
Bash
Sed
Dynamic variable names in Bash
Bash
Variables
Dynamic
Syntax
How to generate a core dump in Linux on a segmentation fault?
Linux
Bash
Unix
Coredump
Tcsh
RE error: illegal byte sequence on Mac OS X
Regex
Macos
Bash
Sed
Read values into a shell variable from a pipe
Linux
Bash
Pipe
How to compare two strings in dot separated version format in Bash?
Linux
Bash
Versioning
'find -exec' a shell function in Linux
Linux
Bash
Shell
Find
Bsd
Shell equality operators (=, ==, -eq)
Bash
Shell
How do I limit the number of results returned from grep?
Linux
Bash
Unix
Sh
Quick unix command to display specific lines in the middle of a file?
Linux
Bash
Unix
Text
Change the current directory from a Bash script
Bash
Environment
How to delete files older than X hours
Bash
Shell: How to call one shell script from another shell script?
Bash
Shell
In Bash, how can I check if a string begins with some value?
String
Bash
Comparison
What does set -e mean in a bash script?
Linux
Bash
Shell
Sh
How to slice an array in Bash
Arrays
Bash
Slice
Using curl POST with variables defined in bash script functions
Json
Bash
Curl
Javascript Objects
Only get hash value using md5sum (without filename)
Bash
Shell
Md5sum
How do I create a Bash alias?
Macos
Bash
Shell
Any way to exit bash script, but not quitting the terminal
Linux
Bash
Reusing output from last command in Bash
Bash
Terminal
Stdout
How to get the list of files in a directory in a shell script?
Bash
Shell
Directory Listing
What is the benefit of using $() instead of backticks in shell scripts?
Bash
Syntax
Sh
Backticks
Temporarily change current working directory in bash to run a command
Bash
Shell
Terminal
Working Directory
How can I get `find` to ignore .svn directories?
Linux
Find
Bash
Grep
Svn
How to undo the effect of "set -e" which makes bash exit immediately if any command fails?
Bash
Exit
source command not found in sh shell
Bash
Shell
Sh
How to check if a process id (PID) exists
Bash
Process
Pid
How do you run a command for each line of a file?
Bash
Loops
Line
Longest line in a file
Bash
Shell
Utilities
How to automatically add user account AND password with a Bash script?
Linux
Bash
Passwd
Execute bash script from URL
Linux
Bash
Curl
How to determine if a process runs inside lxc/Docker?
Linux
Bash
Docker
How to use Bash to create a folder if it doesn't already exist?
Bash
Directory
Check if bash variable equals 0
Bash
Equals
Zero
How to loop over directories in Linux?
Linux
Bash
How can I quickly sum all numbers in a file?
Linux
Perl
Bash
Shell
Awk
Test for non-zero length string in Bash: [ -n "$var" ] or [ "$var" ]
Bash
Shell
If Statement
Syntax
Scripting
Calling shell functions with xargs
Bash
Sh
Xargs
How to concatenate multiple lines of output to one line?
Linux
Bash
Unix
Grep
Tr
Remove all files except some from a directory
Bash
Rm
How do I pause my shell script for a second before continuing?
Bash
Shell
Unix
Add line break to 'git commit -m' from the command line
Git
Bash
Shell
Determine if a function exists in bash
Bash
Function
Testing
Scripting
How can I remove the extension of a filename in a shell script?
Bash
Shell
Sh
Cut
Gnu Coreutils
bash "if [ false ];" returns true instead of false -- why?
Bash
Boolean
Conditional Operator
docker entrypoint running bash script gets "permission denied"
Bash
Shell
Docker
Github permission denied: ssh add agent has no identities
Bash
Github
Ssh
Permission Denied
Public Key
How to store standard error in a variable
Bash
Shell
Redirect
Variables
Stderr
How can I create nonexistent subdirectories recursively using Bash?
Bash
Shell
Recursion
Subdirectory
Perform an action in every sub-directory using Bash
Bash
Command
Directory Traversal
How to split one string into multiple variables in bash shell?
Bash
Shell
Variables
How to gzip all files in all sub-directories into one compressed file in bash
Linux
Bash
Shell
Gzip
Search and replace in bash using regular expressions
Regex
Bash
bash HISTSIZE vs. HISTFILESIZE?
Bash
Unix
Laravel PHP Command Not Found
Php
Bash
Laravel
How to copy a file to multiple directories using the gnu cp command
Linux
Bash
Shell
Iterate over a list of files with spaces
Linux
Bash
Shell
How to run cron once, daily at 10pm
Bash
Cron
System
Scheduled Tasks
Why start a shell command with a backslash?
Bash
Shell
Switch case with fallthrough?
Bash
Switch Statement
How do I disable Git Credential Manager for Windows?
Git
Bash
How do I forward parameters to other command in bash script?
Bash
Command Line
How to create a hex dump of file containing only the hex characters without spaces in bash?
Linux
Bash
Hex
How to use mod operator in bash?
Bash
Modulo
Arithmetic Expressions
uppercase first character in a variable with bash
Bash
How can I match a string with a regex in Bash?
Regex
String
Bash
Negate if condition in bash script
Linux
Bash
If Statement
Negate
How do I get bash completion to work with aliases?
Git
Bash
Shell
Unix
Autocomplete
Extract substring in Bash
String
Bash
Shell
Substring
Count number of lines in a git repository
Bash
Git
Shell
Line Count
Given two directory trees, how can I find out which files differ by content?
Linux
Bash
Shell
Unix
Diff
Copy folder recursively, excluding some folders
Bash
Unix
Shell
Scripting
Getting an "ambiguous redirect" error
Bash
How to check the extension of a filename in a bash script?
Bash
Scripting
File
Check Whether a User Exists
Bash
Why does cURL return error "(23) Failed writing body"?
Macos
Bash
Curl
Osx Lion
Pipe
Generating random number between 1 and 10 in Bash Shell Script
Bash
How to pass arguments to Shell Script through docker run
Bash
Shell
Docker
Command Line-Arguments
Check if passed argument is file or directory in Bash
Bash
Shell
How can I remove all text after a character in bash?
Bash
How to retrieve absolute path given relative
Bash
Shell
Path
Absolute
String comparison in bash. [[: not found
Bash
Shell
Ubuntu 11.04
String Comparison
Passing arrays as parameters in bash
Arrays
Bash
Passing a string with spaces as a function argument in Bash
Bash
Function
How to merge two files line by line in Bash
Bash
Unix
How can I compare two floating point numbers in Bash?
Bash
Floating Point
Comparison
Numbers
Delete node_modules folder recursively from a specified path using command line
Bash
Macos
Command Line-Interface
Node Modules
Piping both stdout and stderr in bash?
Bash
Stdout
Stderr
Piping
bash : Bad Substitution
String
Bash
Ubuntu
Substitution
Piping command output to tee but also save exit code of command
Bash
Shell
Pipe
Sh
Tee
Add a new element to an array without specifying the index in Bash
Bash
Arrays
Check number of arguments passed to a Bash script
Bash
Parameter Passing
Command Line-Arguments
Setting environment variables on OS X
Macos
Bash
Path
Environment Variables
What are the special dollar sign shell variables?
Bash
Environment Variables
Dollar Sign
How can I write a heredoc to a file in Bash script?
Bash
Heredoc
How can I exclude all "permission denied" messages from "find"?
Bash
Error Handling
Find
File Permissions
How do I find the number of arguments passed to a Bash script?
Bash
Arguments
Remove duplicate entries in a Bash script
Bash
Shell
Convert command line arguments into an array in Bash
Arrays
Bash
Shell
How to replace ${} placeholders in a text file?
Bash
Command Line
Text Processing
Templating
How to run the sftp command with a password from Bash script?
Bash
Shell
Unix
Ssh
Sftp
bash: shortest way to get n-th column of output
Bash
Awk
Efficiently test if a port is open on Linux?
Linux
Bash
Shell
Port
linux: kill background task
Linux
Bash
Unix
Kill
Job Control
How to assign the output of a Bash command to a variable?
Bash
Shell
How to append contents of multiple files into one file
Linux
Bash
Unix
How to send email from Terminal?
Bash
Email
Terminal
Difference between single and double square brackets in Bash
Bash
If Statement
Bash: infinite sleep (infinite blocking)
Linux
Bash
Sleep
Infinite
How to make the hardware beep sound in Mac OS X 10.6
Bash
Macos
Applescript
Beep
How to loop through a directory recursively to delete files with certain extensions
Bash
Removing colors from output
Bash
Unix
Colors
Console
Ansi Escape
Run ssh and immediately execute command
Bash
Unix
Ssh
How to redirect stderr and stdout to different files in the same line in script?
Linux
Bash
How to configure git bash command line completion?
Git
Bash
How do I tell if a regular file does not exist in Bash?
Bash
File Io
Scripting
How to concatenate string variables in Bash
Bash
Shell
Syntax
Concat
String Concatenation
How to check if a string contains a substring in Bash
String
Bash
Shell
Substring
Sh
Echo newline in Bash prints literal \n
Bash
Echo
Newline
Read a file line by line assigning the value to a variable
Bash
Reliable way for a Bash script to get the full path to itself
Bash
Path
How does "cat << EOF" work in bash?
Linux
Bash
Scripting
Heredoc
Get the date (a day before current time) in Bash
Bash
Unix
Date
Solaris
How to determine function name from inside a function
Bash
Function
How to add leading zeros for for-loop in shell?
Bash
For Loop
Shell script to delete directories older than n days
Bash
Shell
Bash script processing limited number of commands in parallel
Linux
Bash
Shell
Quick-and-dirty way to ensure only one instance of a shell script is running at a time
Bash
Shell
Process
Lockfile
Send string to stdin
Bash
Redirect
Stdin
Io Redirection
How do I make this file.sh executable via double click?
Bash
Macos
Terminal
Executable
Viewing full output of PS command
Linux
Bash
Shell
Process
How to go to each directory and execute a command?
Bash
Shell
Unix
Find
How to prevent rm from reporting that a file was not found?
Bash
Rm
Get yesterday's date in bash on Linux, DST-safe
Linux
Bash
Bash if statement with multiple conditions throws an error
Bash
If Statement
Flags
How to break out of a loop in Bash?
Bash
Shell
While Loop
RVM is not a function, selecting rubies with 'rvm use ...' will not work
Ruby
Bash
Rvm
/bin/sh: apt-get: not found
Bash
Docker
Dockerfile
Aspell
Worth switching to zsh for casual use?
Bash
Shell
Zsh
Assign output to variable in Bash
Bash
Curl
How do I fetch lines before/after the grep result in bash?
Bash
Shell
Ubuntu
Setting PATH environment variable in OSX permanently
Macos
Bash
Unix
Path
Environment Variables
In a Bash script, how can I exit the entire script if a certain condition occurs?
Bash
Scripting
Exit
Exit Code
Set environment variables from file of key/value pairs
Bash
Variables
Environment Variables
Redirect all output to file in Bash
Linux
Bash
Io Redirection
When do we need curly braces around shell variables?
Bash
Shell
Syntax
Curly Braces
How can I do a recursive find/replace of a string with awk or sed?
Bash
Sed
Awk
Replace
How to get the part of a file after the first line that matches a regular expression
Bash
Shell
Scripting
Grep
Adding git branch on the Bash command prompt
Git
Bash
Ubuntu
Exclude .svn directories from grep
Linux
Bash
Svn
Grep
How to use sed to remove the last n lines of a file
Linux
Bash
Shell
Sed
How to kill a child process after a given timeout in Bash?
Linux
Bash
Unix
The 'eval' command in Bash and its typical uses
Linux
Bash
Shell
Scripting
Eval
How do I delete/remove a shell function?
Bash
Shell
Zsh
List files with certain extensions with ls and grep
Bash
Shell
Macos
Grep
Find all files with a filename beginning with a specified string?
Bash
Find
Emulating a do-while loop in Bash
Bash
Loops
Do While
Get Environment Variable from Docker Container
Bash
Docker
Environment Variables
How to set aliases in the Git Bash for Windows?
Git
Bash
How to produce a range with step n in bash? (generate a sequence of numbers with increments)
Bash
Range
Iteration
Run a string as a command within a Bash script
Bash
Shell
Command Line-Arguments
Intersection of two lists in Bash
Bash
Grep characters before and after match?
Bash
Grep
Command not found when using sudo
Linux
Bash
Sudo
Print a file's last modified date in Bash
Bash
Shell
File
Date
Unix
Check if a variable exists in a list in Bash
Linux
Bash
How to merge every two lines into one from the command line?
Bash
Awk
Sed
Grep
How to replace an entire line in a text file by line number
Bash
Text
Replace
Sed
How to preserve line breaks when storing command output to a variable?
Linux
Bash
Shell
Line Breaks
How can I select random files from a directory in bash?
Bash
Random
In bash, how does one clear the current input?
Bash
Input
Commenting in a Bash script inside a multiline command
Bash
Syntax
Comments
How to split a string into an array in Bash?
Arrays
Bash
Split
How to 'grep' a continuous stream?
Linux
Bash
Shell
Grep
Tail
How to pass all arguments passed to my bash script to a function of mine?
Bash
Function
Parameter Passing
Are double square brackets [[ ]] preferable over single square brackets [ ] in Bash?
Bash
If Statement
Syntax
How to mount a host directory in a Docker container
Bash
Docker
Mount
Boot2docker
choosing between $0 and BASH_SOURCE
Bash
Passing bash variable to jq
Json
Bash
Environment Variables
Jq
How does a Linux/Unix Bash script know its own PID?
Bash
Scripting
Pid
Bash: Syntax error: redirection unexpected
Bash
Ubuntu
Move all files except one
Linux
Bash
Glob
How to get a variable value if variable name is stored as string?
String
Bash
Bash script - variable content as a command to run
Bash
How to use sed/grep to extract text between two words?
String
Bash
Sed
Grep
Why is $$ returning the same id as the parent process?
Bash
Shell
Pid
Subshell
Design patterns or best practices for shell scripts
Design Patterns
Bash
Shell
Fastest way(s) to move the cursor on a terminal command line?
Bash
Terminal
Window
How to use > in an xargs command?
Bash
Redirect
Xargs
How to enter command with password for git pull?
Git
Bash
Command
How to grep for case insensitive string in a file?
Bash
Shell
Awk
Sed
Grep
Delete all but the most recent X files in bash
Bash
Unix
Scripting
Wait for a process to finish
Bash
Scripting
Process
Wait
How to trick an application into thinking its stdout is a terminal, not a pipe
Bash
Terminal
Pipe
Stdin
Find files containing a given text
Bash
Find
How to split strings over multiple lines in Bash?
Bash
Line
Indentation
Command substitution: backticks or dollar sign / paren enclosed?
Bash
Shell
Command
Substitution
What is the difference between ${var}, "$var", and "${var}" in the Bash shell?
Bash
Shell
Variables
Syntax
How to run .sh on Windows Command Prompt?
Windows
Bash
Command Line
Sh
How to make a program continue to run after log out from ssh?
Linux
Bash
Ssh
Why can't I change directories using "cd" in a script?
Bash
How to default to other directory instead of home directory
Bash
Shell
Git Bash
How to fix Terminal not loading ~/.bashrc on OS X Lion
Macos
Bash
Terminal
Osx Lion
Sort a text file by line length including spaces
Bash
Sorting
Text
Awk
How to copy in bash all directory and files recursive?
Bash
Copy
Directory
How to check if the docker engine and a docker container are running?
Bash
Docker
How to process each output line in a loop?
Bash
Shell
Grep
How to silence output in a Bash script?
Bash
Bash foreach loop
Bash
Foreach
Checking if output of a command contains a certain string in a shell script
Bash
Shell
Grep
Get current time in seconds since the Epoch on Linux, Bash
Linux
Bash
Datetime
Redirect stderr and stdout in Bash
Bash
Shell
Stdout
Io Redirection
Stderr
Bash tool to get nth line from a file
Bash
Shell
Unix
Awk
Sed
Difference between single and double quotes in Bash
Bash
Shell
Syntax
Quotes
Bash script plugin for Eclipse?
Eclipse
Bash
Ide
Preserve colouring after piping grep to grep
Linux
Bash
Colors
Grep
Pipe
Bash array with spaces in elements
Arrays
Bash
Unix
Scripting
What is the difference between double-ampersand (&&) and semicolon (;) in Linux Bash?
Linux
Bash
How to manually expand a special variable (ex: ~ tilde) in bash
Bash
Scripting
Tilde
Tilde Expansion
bash assign default value
Bash
How can I set an environment variable only for the duration of the script?
Linux
Bash
Environment Variables
How to redirect output of an already running process
Linux
Bash
How can I reference a file for variables using Bash?
Bash
Variables
Configuration Files
Bash/sh - difference between && and ;
Bash
Shell
Syntax
Multiplatform
How do I use grep to search the current directory for all files having the a string "hello" yet display only .h and .cc files?
Linux
Bash
Unix
Grep
How to delete history of last 10 commands in shell?
Linux
Bash
Shell
Terminal
How to clear all history in linux/ubuntu terminal or bash permanently?
Linux
Bash
Ubuntu
Terminal
Rename all files in directory from $filename_h to $filename_half?
Bash
Shell
apt-get install tzdata noninteractive
Bash
Ubuntu
Dockerfile
Apt Get
Syntax for a single-line while loop in Bash
Bash
Loops
While Loop
How can I compare numbers in Bash?
Bash
Shell
Numeric
How do I prompt a user for confirmation in bash script?
Bash
How do I test if a variable is a number in Bash?
Linux
Bash
Shell
How to kill all processes with a given partial name?
Linux
Bash
Posix
How to use double or single brackets, parentheses, curly braces
Bash
Syntax
How to show a GUI message box from a bash script in linux?
Linux
Bash
Scripting
Ubuntu
Gtk
Inline comments for Bash?
Bash
Comments
How can I store a command in a variable in a shell script?
Linux
Bash
Variables
Command
Accessing last x characters of a string in Bash
String
Bash
Extract
Getting a 'source: not found' error when using source in a bash script
Bash
Virtualenv
Is there a way to make a link clickable in the OSX Terminal?
Bash
Macos
Terminal
Textmate
How do I remove newlines from a text file?
Linux
Bash
Scripting
Shell
Sed
Root user/sudo equivalent in Cygwin?
Bash
Cygwin
Root
Sudo
Creating temporary files in bash
Linux
Bash
Unix
Copy all files with a certain extension from all subdirectories
Bash
Unix
Cp
How to download an entire directory and subdirectories using wget?
Regex
Linux
Bash
Wget
How to set environment variable for everyone under my linux system?
Linux
Unix
Bash
Exit a Script On Error
Bash
Exit
Shell
Use of an exclamation mark in a Git commit message via the command line
Git
Bash
count (non-blank) lines-of-code in bash
Bash
Unix
Count
Lines
Nonblank
How can I debug a Bash script?
Bash
Shell
How to display a specific user's commits in svn log?
Svn
Bash
Version Control
UNIX export command
Bash
Shell
Unix
How to determine the current interactive shell that I'm in? (command-line)
Bash
Unix
Shell
Csh
Tcsh
Find and kill a process in one line using bash and regex
Regex
Bash
Terminal
Awk
Automatic exit from Bash shell script on error
Bash
Shell
Error Handling
Exit
How do I remove all .pyc files from a project?
Bash
How do I compare two string variables in an 'if' statement in Bash?
Bash
If Statement
Scripting
Bash function to find newest file matching pattern
Linux
Bash
Run cron job only if it isn't already running
Linux
Bash
Cron
Watchdog
How to only find files in a given directory, and ignore subdirectories using bash
Bash
Unix
How to properly handle a gzipped page when using curl?
Bash
Curl
Gzip
How can I do division with variables in a Linux shell?
Linux
Bash
Shell
Variables
Division
How to tell if a string is not defined in a Bash shell script
Bash
Shell
Scripting
String
Null
How can I check the size of a file using Bash?
Bash
How to sort an array in Bash
Arrays
Bash
Shell
Sorting
How can I run a function from a script in command line?
Linux
Bash
Scripting
How to run two commands with sudo?
Bash
Sudo
What is the use case of noop [:] in bash?
Bash
Shell
Noop
How to force 'cp' to overwrite directory instead of creating another one inside?
Linux
Bash
Shell
Command Line
Cp
How to loop over files in directory and change path and add suffix to filename
Bash
For Loop
Filenames
Glob
How to define hash tables in Bash?
Bash
Dictionary
Hashtable
Associative Array
How do I use su to execute the rest of the bash script as that user?
Bash
Permissions
Sudo
User Permissions
Su
Bash Templating: How to build configuration files from templates with Bash?
Bash
Templates
Templating
Colors with unix command "watch"?
Linux
Bash
Ubuntu
Watch
Bash Script: count unique lines in file
Bash
How to check if a Docker image with a specific tag exist locally?
Bash
Docker
With bash, how can I pipe standard error into another process?
Bash
Pipe
Stderr
How do I capture bash output to the Mac OS X clipboard?
Macos
Bash
Terminal
Clipboard
shell init issue when click tab, what's wrong with getcwd?
Linux
Bash
Shell
Pwd
Getcwd
Variable interpolation in the shell
Bash
Shell
Unix
Is there anything in Zsh like .bash_profile?
Bash
Zsh
rsync copy over only certain types of files using include option
Linux
Bash
Shell
Rsync
Minimal web server using netcat
Bash
Webserver
Netcat
Remove an element from a Bash array
Arrays
Bash
Variables
How to parse XML in Bash?
Xml
Bash
Xhtml
Shell
Xpath
"while :" vs. "while true"
Bash
How to include file in a bash shell script
Linux
Bash
Include
Loop through all the files with a specific extension
Bash
File
Glob
extract part of a string using bash/cut/split
String
Bash
How set multiple env variables for a bash command
Linux
Bash
Cygwin
What is your single most favorite command-line trick using Bash?
Bash
Command Line
Check if pull needed in Git
Git
Bash
Shell
How do I know the script file name in a Bash script?
Linux
Bash
Shell
Scripting
How to detect the OS from a Bash script?
Bash
Os Detection
How to get the last character of a string in a shell?
String
Bash
Shell
Difference between ${} and $() in Bash
Linux
Bash
Scripting
How do I escape the wildcard/asterisk character in bash?
Bash
Shell
Escaping
How to source virtualenv activate in a Bash script
Python
Bash
Virtualenv
Delete files older than 10 days using shell script in Unix
Bash
Shell
Unix
Find
unix diff side-to-side results?
Bash
Unix
Diff
How to remove a newline from a string in Bash
Bash
Variables
Multiline syntax for piping a heredoc; is this portable?
Bash
Shell
Pipe
Sh
Heredoc
How can I run bash in a new container of a docker image?
Bash
Docker
Convert Unix timestamp to a date string
Bash
Shell
Unix
Unix Timestamp
Search for executable files using find command
Bash
Unix
Terminal
Find
Find Util
DESTDIR and PREFIX of make
C
Linux
Bash
Makefile
Configure
Hexadecimal To Decimal in Shell Script
Bash
Shell
Hex
Decimal
Why does sed not replace all occurrences?
Bash
Sed
How can I set the current working directory to the directory of the script in Bash?
Bash
Path
Scripting
How can I remove the first line of a text file using bash/sed script?
Bash
Scripting
Sed
Print a file, skipping the first X lines, in Bash
Linux
Bash
Printing
Skip
How do I write standard error to a file while using "tee" with a pipe?
Linux
Bash
Unix
Tee
How do I execute a bash script in Terminal?
Bash
Terminal
Deleting lines from one file which are in another file
Bash
Scripting
Sh
How can I strip first X characters from string using sed?
Bash
Shell
Sed
Save current directory in variable using Bash?
Bash
Variables
Directory
Get first line of a shell command's output
Linux
Bash
Shell
Multi-line bash commands in makefile
Bash
Makefile
How to count number of files in each directory?
Linux
Bash
Ubuntu
Count occurrences of a char in a string using Bash
Bash
Shell
Sh
How to exit a function in bash
Bash
Function
Exit
Raise error in a Bash script
Linux
Bash
Shell
Error Handling
Scripting
How can you diff two pipelines in Bash?
Bash
Diff
Pipeline
How to make zsh run as a login shell on Mac OS X (in iTerm)?
Macos
Bash
Shell
Zsh
Use Expect in a Bash script to provide a password to an SSH command
Linux
Bash
Ssh
Expect
How to run script as another user without password?
Linux
Bash
Sudo
Su
Sudoers
How do I script a "yes" response for installing programs?
Linux
Bash
Scripting
env: bash\r: No such file or directory
Windows
Git
Bash
Line Endings
core.autocrlf
How do you search for files containing DOS line endings (CRLF) with grep on Linux?
Linux
Bash
Grep
Newline
Split files using tar, gz, zip, or bzip2
Linux
Bash
File Io
Compression
Linux bash: Multiple variable assignment
Linux
Bash
Shell
Variable Assignment
Multiple Variable-Return
In the shell, what does " 2>&1 " mean?
Bash
Shell
Unix
Redirect
How can I check if a program exists from a Bash script?
Bash
How do I split a string on a delimiter in Bash?
Bash
Shell
Split
Scripting
Extract filename and extension in Bash
Bash
String
Filenames
How can I add numbers in a Bash script?
Bash
Integer Arithmetic
Mathematical Expressions
How to wait in bash for several subprocesses to finish, and return exit code !=0 when any subprocess ends with code !=0?
Bash
Process
Wait
How do I get cURL to not show the progress bar?
Linux
Bash
Unix
Scripting
Curl
Find and Replace Inside a Text File from a Bash Command
Bash
Replace
Scripting
Ironpython
Passing arguments to an interactive program non-interactively
Bash
Interactive
Non Interactive
How to extract one column of a csv file
Bash
Csv
Extract
Remove first element from $@ in bash
Arrays
Bash
Diff output from two programs without temporary files
Bash
File
Diff
What does `kill -0 $pid` in a shell script do?
Bash
Shell
Scripting
Signals
Kill
How to reverse-i-search back and forth?
Linux
Bash
Shell
Search
How can I retrieve the first word of the output of a command in Bash?
Bash
File content into unix variable with newlines
Bash
Unix
unix - head AND tail of file
Linux
Bash
Shell
Unix
Scripting
How to specify a multi-line shell variable?
Bash
Shell
How can I extract the first two characters of a string in shell scripting?
Bash
Shell
Grep
Sh
Gnu Coreutils
How to run a command before a Bash script exits?
Bash
Bash script to set up a temporary SSH tunnel
Bash
Ssh
How do I use a file grep comparison inside a bash if/else statement?
Bash
Bash script to calculate time elapsed
Linux
Bash
Shell
sudo echo "something" >> /etc/privilegedFile doesn't work
Bash
Shell
Scripting
Permissions
Sudo
Unit testing Bash scripts
Bash
Testing
Tdd
Automated Tests
Extreme Programming
Recursively remove files
Linux
Bash
What are the differences among grep, awk & sed?
Linux
Bash
Sed
Awk
Grep
Can I grep only the first n lines of a file?
Bash
Search
Grep
How to show and update echo on same line
Bash
How to resume scp with partially copied files?
Bash
Rsync
Scp
Resume
How to pass a variable containing slashes to sed
Bash
Sed
How to edit files in stopped/not starting docker container
Bash
Docker
warning: ignoring broken ref refs/remotes/origin/HEAD
Git
Bash
How do I get both STDOUT and STDERR to go to the terminal and a log file?
Bash
Logging
Shell
Hiding user input on terminal in Linux script
Linux
Bash
Scripting
Remove redundant paths from $PATH variable
Linux
Bash
Path
Environment Variables
Sh
Running bash script from within python
Python
Bash
Call
While loop stops reading after the first line in Bash
Bash
Shell
Ssh
While Loop
Bash Script : what does #!/bin/bash mean?
Bash
What does it mean in shell when we put a command inside dollar sign and parentheses: $(command)
Bash
Shell
Terminal
Sh
Ksh
Only mkdir if it does not exist
Bash
Unix
About .bash_profile, .bashrc, and where should alias be written in?
Bash
Shell
Environment
How can I find out a file's MIME type (Content-Type)?
Linux
Bash
Content Type
Mime
Mime Types
In Bash, how do I add a string after each line in a file?
Linux
Bash
Unix
Sed
How can pass the value of a variable to the standard input of a command?
Security
Bash
Stdin
Automatically capture output of last command into a variable using Bash?
Linux
Bash
Command Line
Bash history without line numbers
Linux
Bash
Check free disk space for current partition in bash
Linux
Bash
Delete multiple remote branches in git
Git
Bash
Grepping a huge file (80GB) any way to speed it up?
Bash
Grep
Relative paths based on file location instead of current working directory
Bash
Shell
Have bash script answer interactive prompts
Linux
Bash
Automation
Command Prompt
Prompt
Remove a fixed prefix/suffix from a string in Bash
Bash
How to write a bash script that takes optional input arguments?
Bash
Arguments
Parameter Passing
Capturing multiple line output into a Bash variable
Bash
Variables
Command not found error in Bash variable assignment
Bash
Shell
Syntax
Sh
Variable Assignment
How can I profile a Bash shell script slow startup?
Bash
Profiling
Unix - create path of folders and file
Linux
Bash
Shell
Unix
Scripting
Counter increment in Bash loop not working
Linux
Bash
Shell
Scripting
Counter
CURL to access a page that requires a login from a different page
Linux
Bash
Cookies
Curl
Http Authentication
macOS Catalina 10.15(beta) - Why is ~/.bash_profile not sourced by my shell?
Bash
Shell
Environment Variables
Zsh
Macos Catalina
What is the difference between PS1 and PROMPT_COMMAND?
Bash
Prompt
Is \d not supported by grep's basic expressions?
Linux
Bash
Grep
Bash mkdir and subfolders
Bash
Mkdir
Git Bash
Reading output of a command into an array in Bash
Arrays
Bash
How do I change bash history completion to complete what's already on the line?
Linux
Bash
Shell
Reload .profile in bash shell script (in unix)?
Bash
Shell
Unix
.Bash Profile
How to tell bash that the line continues on the next line
Bash
Check if a Bash array contains a value
Arrays
Bash
How can I split a large text file into smaller files with an equal number of lines?
Bash
File
Unix
How to append output to the end of a text file
Bash
Shell
How to Batch Rename Files in a macOS Terminal?
Bash
Macos
Shell
Terminal
File Rename
How to see files and file structure on a deployed Heroku app
Bash
Heroku
Redirect STDERR / STDOUT of a process AFTER it's been started, using command line?
Linux
Bash
Shell
How do you append to an already existing string?
String
Bash
Shell
String Concatenation
List of Java processes
Linux
Bash
Unix
Command Line
How to open Emacs inside Bash
Bash
Emacs
I just assigned a variable, but echo $variable shows something else
Bash
Shell
Sh
Quoting
Copy Files from Windows to Windows Subsystem for Linux (WSL)
Linux
Windows
Bash
Windows 10
Windows Subsystem-for-Linux
Compare integer in bash, unary operator expected
Linux
Bash
Shell
BASH copy all files except one
Linux
Bash
Terminal
Copy
Cp
Remove a character from the end of a variable
Bash
Shell
Alias with variable in bash
Linux
Bash
Extract directory from path
String
Bash
Path
What is the simplest way to remove a trailing slash from each parameter?
Bash
Shell
Arguments
Rsync
Stripslashes
How to concatenate stdin and a string?
Bash
How to read user input into a variable in Bash?
Bash
Shell
How to insert a new line in Linux shell script?
Linux
Bash
Newline
How to modify a global variable within a function in bash?
Bash
Variables
Global Variables
Eval
How to set env variable in Jupyter notebook
Python
Bash
Environment Variables
Jupyter Notebook
How do I rename all files to lowercase?
Macos
File
Bash
Bash ignoring error for a particular command
Linux
Bash
How to obtain the number of CPUs/cores in Linux from the command line?
Linux
Bash
Cpu
Ternary operator (?:) in Bash
Bash
Syntax
Conditional Operator
Bash script and /bin/bash^M: bad interpreter: No such file or directory
Bash
Shell - Write variable contents to a file
Linux
Bash
Shell
Portable way to get file size (in bytes) in the shell
Linux
Bash
Shell
Solaris
Bash, no-arguments warning, and case decisions
Bash
bash string equality
Bash
Equals
Equality
get just the integer from wc in bash
Bash
Wc
Passing argument to alias in bash
Bash
Shell
.Bash Profile
How to run Gradle from the command line on Mac bash
Java
Macos
Bash
Gradle
Checking from shell script if a directory contains files
Bash
Unix
Shell
Associative arrays in Shell scripts
Bash
Shell
Hashtable
Associative Array
How do I symlink all files from one directory to another in bash?
Bash
Symlink
Ln
Bash script absolute path with OS X
Macos
Bash
Path
How to parse a CSV file in Bash?
Linux
Bash
Csv
Bash syntax error: unexpected end of file
Bash
Syntax
Trying to embed newline in a variable in Bash
Bash
Check if string is neither empty nor space in shell script
Bash
Shell
Freebsd
Disable beep in WSL terminal on Windows 10
Bash
Windows 10
Windows Subsystem-for-Linux
How does one change the language of the command line interface of Git?
Bash
Git
Localization
Environment Variables
Locale
How can I escape white space in a bash loop list?
Bash
Loops
Whitespace
Test whether string is a valid integer
String
Bash
If Statement
Integer
Exclude a sub-directory using find
Bash
Unix
counting number of directories in a specific directory
Linux
Bash
How to remove trailing whitespace of all files recursively?
Bash
Whitespace
What's the best way to use R scripts on the command line (terminal)?
R
Bash
Command Line
Scripting
How to test an Internet connection with bash?
Bash
Connection
Ping
What's the magic of "-" (a dash) in command-line parameters?
Linux
Bash
Shell
Unix
Command Line
Display current date and time without punctuation
Bash
Shell
Date
What's the difference between .bashrc, .bash_profile, and .environment?
Shell
Environment
Bash
String difference in Bash
String
Bash
How to use an environment variable inside a quoted string in Bash
Bash
Quotes
Environment
What is the best way to ensure only one instance of a Bash script is running?
Linux
Bash
Pid
Flock
Lockfile
Why do you need to put #!/bin/bash at the beginning of a script file?
Linux
Bash
Scripting
Shebang
Colorized grep -- viewing the entire file with highlighted matches
Bash
Shell
Colors
Grep
What is the exact meaning of IFS=$'\n'?
Bash
Shell
Variables
Environment Variables
Ifs
Why should eval be avoided in Bash, and what should I use instead?
Linux
Bash
Unix
Eval
Getting "Warning! PATH is not properly set up" when doing rvm use 2.0.0 --default
Ruby
Bash
Rvm
Ruby 2.0
.Bash Profile
Regex matching in a Bash if statement
Regex
Bash
If Statement
How can I store the "find" command results as an array in Bash
Arrays
Bash
Variables
Find
On EC2: sudo node command not found, but node without sudo is ok
node.js
Bash
Amazon Ec2
Sudo
What does "export" do in shell programming?
Bash
Shell
Zsh
How can I put the current running linux process in background?
Linux
Bash
Shell
Background
How to hide command output in Bash
Bash
Shell
What do double-asterisk (**) wildcards mean?
Bash
Unix
Wildcard
Glob
Wildcard Expansion
Running a script inside a docker container using shell script
Bash
Shell
Docker
Determine the path of the executing BASH script
Bash
How to sort a file, based on its numerical values for a field?
Linux
Bash
Sorting
Command
How does bash tab completion work?
Bash
Shell
Autocomplete
Bash script prints "Command Not Found" on empty lines
Linux
Bash
Debian
How to use shell commands in Makefile
Bash
Makefile
Echo
Multiplication on command line terminal
Bash
Unix
Command Line
How to create a loop in bash that is waiting for a webserver to respond?
Bash
Exit zsh, but leave running jobs open?
Bash
Zsh
Jobs
How to move all files including hidden files into parent directory via *
Linux
Bash
Shell
Command
How to obtain the absolute path of a file via Shell (BASH/ZSH/SH)?
Bash
Shell
Path
What is the most elegant way to remove a path from the $PATH variable in Bash?
Bash
Shell
Path
Variable Expansion
List Processing
Git Bash doesn't see my PATH
Windows
Bash
Git Bash
Call Python script from bash with argument
Python
Linux
Bash
Shell
Debian
Don't display pushd/popd stack across several bash scripts (quiet pushd/popd)
Bash
Output
Built In
How do I run a terminal command in a Swift script? (e.g. xcodebuild)
Swift
Bash
Shell
Xcodebuild
Linux: compute a single hash for a given folder & contents?
Linux
Bash
Hash
Identify user in a Bash script called by sudo
Linux
Bash
Sudo
Referring to a file relative to executing script
Bash
Shell
How do I paste multi-line bash codes into terminal and run it all at once?
Linux
Bash
Shell
Terminal
Paste
Extract substring using regexp in plain bash
Regex
Bash
nodemon not working: -bash: nodemon: command not found
node.js
Bash
Express
Npm
Nodemon
An efficient way to transpose a file in Bash
Bash
Parsing
Unix
Transpose
How to iterate through all git branches using bash script
Git
Bash
Git Bash
How to do a logical OR operation for integer comparison in shell scripting?
Bash
Unix
If Statement
Sh
ls command: how can I get a recursive full-path listing, one line per file?
Bash
Command Line
Find
Ls
How to use 'cp' command to exclude a specific directory?
Linux
Bash
Terminal
Command
Cp
Script parameters in Bash
Linux
Bash
Shell
Parameters
Creating a new user and password with Ansible
Bash
Shell
Ubuntu
Ansible
Trying to use bash on Windows and got no installed distributions message
Linux
Windows
Bash
Windows Subsystem-for-Linux
How to get the contents of a webpage in a shell variable?
Linux
Bash
Shell
Wget
How to handle more than 10 parameters in shell
Linux
Bash
Shell
Parameters
Bash empty array expansion with `set -u`
Bash
Cron jobs and random times, within given hours
Bash
Cron
Sh
How can Bash execute a command in a different directory context?
Bash
Shell
Working Directory
How does this bash fork bomb work?
Bash
Unix
recursively add file extension to all files
Bash
File
Shell
Command Line
File Extension
What is the Bash equivalent of Python's pass statement
Python
Bash
Language Comparisons
Passing variables in remote ssh command
Linux
Bash
Shell
Ssh
How to resolve "You need to have Ruby and Sass installed and in your PATH for this task to work" Warning?
Ruby
Macos
Bash
Terminal
Sass
Different bash prompt for different vi editing mode?
Bash
Prompt
Why is sed not recognizing \t as a tab?
Regex
Bash
Sed
Padding characters in printf
Bash
Shell
Printf
How do I grab an INI value within a shell script?
Bash
Shell
Config
Ini
Test if a variable is set in bash when using "set -o nounset"
Bash
Shell
Unix
Convert date time string to epoch in Bash
Bash
Shell
Date
How to include an '&' character in a bash curl statement
Bash
Curl
What is the best way to count "find" results?
Bash
Find
Curl with multiline of JSON
Bash
Shell
Ubuntu
Curl
How to format a JSON string as a table using jq?
Json
Bash
Jq
How can I assign the output of a function to a variable using bash?
Bash
Variables
Function
How to find the length of an array in shell?
Arrays
Bash
Shell
How to add Git's branch name to the commit message?
Git
Bash
Git Branch
How can I use a file in a command and redirect output to the same file without truncating it?
Bash
Redirect
Io
Stop and delete Docker container if it's running
Bash
Docker
Containers
How to change the output color of echo in Linux
Linux
Bash
Command Line
Echo
Terminal Color
How do I parse command line arguments in Bash?
Bash
Command Line
Scripting
Arguments
Getopts
Multi-line string with extra space (preserved indentation)
String
Bash
Shell
Echo
How to run a shell script on a Unix console or Mac terminal?
Linux
Bash
Macos
Shell
Unix
How to delete multiple files at once in Bash on Linux?
Linux
Bash
Rm
How to convert a string from uppercase to lowercase in Bash?
String
Bash
Shell
Uppercase
Lowercase
Redirect all output to file using Bash on Linux?
Linux
Bash
Stdout
Stderr
psql: command not found Mac
Macos
Bash
Postgresql
Psql
How to delete and replace last line in the terminal using bash?
Bash
Replace
Terminal
Line
Is there a way to run Bash scripts on Windows?
Windows
Bash
How to list the size of each file and directory and sort by descending size in Bash?
Linux
File
Bash
Semicolons superfluous at the end of a line in shell scripts?
Bash
Shell
Syntax
How to list only files and not directories of a directory Bash?
Bash
File Listing
Build a JSON string with Bash variables
Json
Bash
Quoting
Bash variable scope
Bash
Scope
Pipe
Press alt + numeric in bash and you get (arg [numeric]) what is that?
Bash
Shell
Keyboard Shortcuts
Readline
Clean way to launch the web browser from shell script?
Bash
Shell
Command Line
Standards
Standards Compliance
How do I prevent Conda from activating the base environment by default?
Bash
Conda
Process all arguments except the first one (in a bash script)
Bash
Shell
Expansion of variables inside single quotes in a command in Bash
Bash
Shell
Variables
Quotes
Using unset vs. setting a variable to empty
Bash
Variables
Syntax
How can I see the current value of my $PATH variable on OS X?
Macos
Bash
Path
Environment Variables
Homebrew
How to use AWS S3 CLI to dump files to stdout in BASH?
Bash
Amazon Web-Services
Amazon S3
Aws Cli
How to execute a Bash command only if a Docker container with a given name does not exist?
Bash
Docker
Asynchronous shell commands
Linux
Bash
Shell
Ubuntu
Asynchronous
Simulating ENTER keypress in bash script
Bash
Shell
Ubuntu
How do I prevent commands from showing up in Bash history?
Bash
How to split a file into equal parts, without breaking individual lines?
Bash
Shell
Unix
Split
Turning multi-line string into single comma-separated
String
Bash
Shell
Csv
Browsing Folders in MSYS
Bash
Msys
Bash set +x without it being printed
Bash
Shell
How to make an "alias" for a long path?
Linux
Bash
Unix
Scripting
Switching users inside Docker image to a non-root user
Linux
Bash
Git
Docker
Debian
Batch renaming files with Bash
Bash
Shell
File Rename
Command to escape a string in bash
Bash
Escaping
Getting the count of unique values in a column in bash
Bash
Command Line
Frequency
How execute bash script line by line?
Bash
Detect if homebrew package is installed
Bash
Shell
Homebrew
How to get a password from a shell script without echoing
Bash
Shell
Scripting
Sh
find -exec with multiple commands
Bash
Find
How to get cURL to output only HTTP response body (JSON) and no other headers etc
Json
Bash
Curl
How to access command line arguments of the caller inside a function?
Bash
Command Line-Arguments
Argv
How to concatenate two strings to build a complete path
Linux
Bash
How can I get unique values from an array in Bash?
Linux
Arrays
Bash
Unique
bash: mkvirtualenv: command not found
Python
Bash
Centos
Virtualenv
Virtualenvwrapper
Writing outputs to log file and console
Bash
Shell
Redirect
Logging
How to rename with prefix/suffix?
Bash
Rename
Filenames
Prefix
Mv
how do I check in bash whether a file was created more than x time ago?
Linux
Bash
Command Line
Bash script to cd to directory with spaces in pathname
Bash
Escaping
Python vs Bash - In which kind of tasks each one outruns the other performance-wise?
Python
Performance
Bash
Using colors with printf
Linux
Bash
Colors
Printf
HMAC-SHA1 in bash
Bash
Sha1
Hmac
Define a Makefile variable using a ENV variable or a default value
Bash
Shell
Makefile
Environment Variables
Length of string in bash
Bash
Variables
String Length
Why is whitespace sometimes needed around metacharacters?
Bash
Shell
Syntax
Syntax Error
Passing IPython variables as arguments to bash commands
Python
Bash
Jupyter Notebook
Ipython
Command Line-Arguments
How to print / echo environment variables?
Bash
Eval
Openssh Private Key to RSA Private Key
Bash
Macos
Ssh
Rsa
Openssh
Meaning of tilde in Linux bash (not home directory)
Linux
Bash
Home Directory
Finding empty directories
Bash
Unix
Directory
Read user input inside a loop
Bash
How do I get sed to read from standard input?
Linux
Bash
Shell
Append file contents to the bottom of existing file in Bash
Bash
Sed
Awk
Append
What is the Bash file extension?
Bash
Shell
How to avoid heredoc expanding variables?
Bash
Escaping
Substitution
Heredoc
Making ZSH default Shell in MacOSX
Bash
Shell
Zsh
Modify a key-value in a json using jq in-place
Json
Bash
Shell
Jq
Find all storage devices attached to a Linux machine
Linux
Bash
Shell
Using the star sign in grep
Regex
Bash
Grep
How to list variables declared in script in bash?
Bash
Variables
How to keep quotes in Bash arguments?
Bash
Quotes
Batch equivalent of Bash backticks
Bash
Batch File
Backticks
What does 'cd -' stand for?
Linux
Bash
Shell
How to extract text from a string using sed?
Regex
Bash
Sed
How to find the largest file in a directory and its subdirectories?
File
Bash
Directory
Find
Large Files
Easiest way to check for an index or a key in an array?
Arrays
Bash
Indexing
Key
How to have the cp command create any necessary folders for copying a file to a destination
Linux
Bash
Cp
How do I rename the extension for a bunch of files?
Bash
Rename
File Rename
How do I execute any command editing its file (argument) "in place" using bash?
Bash
Command Line
Sorting
Sleep until a specific time/date
Bash
Sleep
Wait
In Unix, how do you remove everything in the current directory and below it?
Bash
Unix
Directory
Subdirectory
Delete Directory
tar: add all files and directories in current directory INCLUDING .svn and so on
Linux
Bash
Design Patterns
Tar
Loop over tuples in bash?
Bash
For Loop
How to keep two folders automatically synchronized?
Bash
Synchronization
How to give a pattern for new line in grep?
Bash
Grep
Newline
Single script to run in both Windows batch and Linux Bash?
Bash
Batch File
Pipe only STDERR through a filter
Linux
Bash
Redirect
Automating "enter" keypresses for bash script generating ssh keys
Bash
How to update one file in a zip archive
Bash
Shell
Zip
ssh breaks out of while-loop in bash
Bash
Ssh
Aborting a shell script if any command returns a non-zero value
Linux
Bash
Unix
Shell
How to zero pad a sequence of integers in bash so that all have the same width?
Bash
Numbers
Padding
What is the difference between "#!/usr/bin/env bash" and "#!/usr/bin/bash"?
Linux
Bash
Shell
Unix
Shebang
Number of processors/cores in command line
Linux
Bash
Command Line
What does 'bash -c' do?
Linux
Bash
How to loop through dates using Bash?
Bash
Loops
Date
Running programs in parallel using xargs
Bash
Parallel Processing
Xargs
What linux shell command returns a part of a string?
Linux
String
Bash
Substr
In what order should I send signals to gracefully shutdown processes?
Bash
Signals
Job Control
Sigterm
How to make .bashrc aliases available within a vim shell command? (:!...)
Bash
Vim
Alias
How to change a command line argument in Bash?
Bash
Command Line-Arguments
Remove first character of a string in Bash
Bash
Stop shell wildcard character expansion?
Bash
Wildcard
How to show line number when executing bash script
Linux
Bash
Testing
Bash command line and input limit
Bash
Shell
Unix
Command Line-Arguments
Running bash scripts with npm
node.js
Bash
Shell
Npm
Piping not working with echo command
Bash
Echo
Validating parameters to a Bash script
Validation
Bash
Shell
How to invoke bash, run commands inside the new shell, and then give control back to user?
Shell
Bash
For files in directory, only echo filename (no path)
Bash
Shell
Linux/Unix command to determine if process is running?
Linux
Bash
Shell
Unix
Process
How to return a string value from a Bash function
String
Bash
Function
Return Value
Delete all local git branches
Git
Bash
Ubuntu
Version Control
Grep
How do I specify a password to 'psql' non-interactively?
Postgresql
Bash
Command Line
Psql
Get string after character
String
Bash
Extract
Iterate over two arrays simultaneously in bash
Arrays
Bash
Loops
Equivalent of rm and mv in windows .cmd
Bash
Shell
Cmd
Bash script error [: !=: unary operator expected
Bash
Grep 'binary file matches'. How to get normal grep output?
Bash
Grep
How to call cURL without using server-side cache?
Linux
Bash
Caching
Curl
Memcached
Renaming part of a filename
Bash
Filenames
Rename
List files by last edited date
Bash
Shell
While loop to test if a file exists in bash
Bash
Shell
How do I use vi keys in ipython under *nix?
Python
Bash
Vi
Ipython
Readline
How to return an array in bash without using globals?
Arrays
Bash
Global Variables
Parameter Passing
How can I align the columns of tables in Bash?
Bash
Echo
Recursively change file extensions in Bash
Regex
Linux
Bash
Shell
Sh
How to use GNU sed on Mac OS 10.10+, 'brew install --default-names' no longer supported
Macos
Bash
Sed
Homebrew
Gnu
How do I write a 'for' loop in Bash?
Bash
For Loop
Iterator
What tool to use to draw file tree diagram
Bash
Shell
Filesystems
Diagram
How to get the name of the current git branch into a variable in a shell script?
Linux
Git
Bash
Shell
Ubuntu
Multithreading in Bash
Linux
Multithreading
Bash
Shell
How to evaluate a boolean variable in an if block in bash?
Bash
How do I delete all lines in a file starting from after a matching line?
Linux
Bash
Sed
Recursively look for files with a specific extension
Linux
Bash
Recursion
Can a shell script set environment variables of the calling shell?
Bash
Shell
Csh
Tcsh
Create timestamp variable in bash script
Bash
Variables
Timestamp
What's a concise way to check that environment variables are set in a Unix shell script?
Bash
Unix
Shell
How to join multiple lines of file names into one with custom delimiter?
Linux
Bash
Shell
Parsing
Merge
How to check syslog in Bash on Linux?
Linux
Bash
Syslog
Check if directory mounted with bash
Linux
Bash
Centos
Mount
Forcing bash to expand variables in a string loaded from a file
Linux
Bash
Shell
Unix
How can I set Bash aliases for docker containers in Dockerfile?
Bash
Unix
Docker
Alias
Dockerfile
How can you export your .bashrc to .zshrc?
Zsh
Bash
Zshrc
How to create a bash script to check the SSH connection?
Bash
Ssh
Connection
Bash: Copy named files recursively, preserving folder structure
Bash
Shell
Using sed to mass rename files
Bash
Shell
Sed
File Rename
How do you diff a directory for only files of a specific type?
Linux
Bash
Why can't I specify an environment variable and echo it in the same command line?
Bash
Environment Variables
Echo
What does >& mean?
Bash
Io
File Descriptor
Io Redirection
Forward function declarations in a Bash or a Shell script?
Bash
Function
Sh
Forward Declaration
here-document gives 'unexpected end of file' error
Bash
Email
Heredoc
How do I know when my docker mysql container is up and mysql is ready for taking queries?
Mysql
Bash
Shell
Docker
Removing created temp files in unexpected bash exit
Bash
Exit
Temporary Files
Force flushing of output to a file while bash script is still running
Bash
File
Flush
Linux: copy and create destination dir if it does not exist
Linux
Bash
Shell
Unix
Cp
How to extract directory path from file path?
Bash
How to set keyboard shortcuts to jump to beginning/end of line?
Macos
Bash
Iterm
Iterm2
Emulating Bash 'source' in Python
Python
Bash
Bash: pass a function as parameter
Bash
Function
Callback
Parameter Passing
Bash scripting missing ']'
Bash
Scripting
Passing arguments with spaces between (bash) script
Bash
Creating an array from a text file in Bash
Arrays
Bash
Loops
Scripting
Variable Assignment
Bash script to receive and repass quoted parameters
Bash
Unix
bash - how to pipe result from the which command to cd
Linux
Bash
Shell
Cd
Add file extension to files with bash
Linux
Bash
How to read MANIFEST.MF file from JAR using Bash
Bash
Jar
manifest.mf
Is there a way to create key-value pairs in Bash script?
Bash
Shell
Associative Array
How do I assign ls to an array in Linux Bash?
Arrays
Bash
Shell
Ls
bash alias command with both single and double quotes
Linux
Bash
Quotes
Double Quotes
How to catch exception output from Python subprocess.check_output()?
Python
Bash
Subprocess
How to create a file in Linux from terminal window?
Linux
Bash
File
Command Line-Interface
Difference between return and exit in Bash functions
Bash
Function
Return Value
Return
Exit
Is there a TRY CATCH command in Bash
Bash
Shell
Error Handling
How to add a progress bar to a shell script?
Bash
Shell
Zsh
How can I join elements of an array in Bash?
Arrays
Bash
What expands to all files in current directory recursively?
Bash
Shell
Wildcard
Glob
Shopt
A confusion about ${array[*]} versus ${array[@]} in the context of a bash completion
Arrays
Bash
Bash Completion
In bash, how do I bind a function key to a command?
Bash
Shell
Binding
How to add include and lib paths to configure/make cycle?
Bash
Makefile
Linker
Configure
Autoconf
How to grep, excluding some patterns?
Bash
Grep
envsubst: command not found on Mac OS X 10.8
Bash
Shell
Terminal
Sh
Command Line-Interface
Parallelize Bash script with maximum number of processes
Bash
How to execute the output of a command within the current shell?
Bash
Shell
Unix
Pipe
Split output of command by columns using Bash?
Linux
Bash
Pipe
How do I preserve newlines in a quoted string in Bash?
Bash
Can colorized output be captured via shell redirect?
Bash
Shell
Colors
Terminal
Redirect
How do you find the original user through multiple sudo and su commands?
Linux
Bash
Unix
Sudo
Su
How to search filenames by regex with "find"
Bash
Unix
Store output of sed into a variable
Bash
How do I set a variable to the output of a command in Bash?
Bash
Shell
Command Line
How to check if a variable is set in Bash
Bash
Shell
Variables
How to reload .bashrc settings without logging out and back in again?
Bash
Shell
Terminal
Reload
Profile
How do I iterate over a range of numbers defined by variables in Bash?
Bash
Shell
For Loop
Syntax
Loop through an array of strings in Bash?
Arrays
Bash
Shell
cp -r without hidden files
Linux
Bash
Cp
How do I test for an empty string in a Bash case statement?
String
Bash
Null
Case
Speed up rsync with Simultaneous/Concurrent File Transfers?
Bash
Shell
Ubuntu 12.04
Rsync
Simultaneous
Integer ASCII value to character in BASH using printf
Bash
Ascii
Printf
The easiest way to replace white spaces with (underscores) _ in bash
Bash
Sed
Check whether a certain file type/extension exists in directory
Linux
Bash
Shell
Echoing the last command run in Bash?
Bash
Command
In bash, how do I count the number of lines in a variable?
Bash
String
Looping through alphabets in Bash
Bash
Loops
For Loop
Check if a file is executable
Bash
Tcsh
How can I run a C program on Mac OS X using Terminal?
C
Macos
Bash
How to create a cron job using Bash automatically without the interactive editor?
Bash
Shell
Cron
How to properly nest Bash backticks
Bash
Shell
Unix
Quoting
Create text file and fill it using bash
Bash
Unix
How to find the difference in days between two dates?
Bash
Shell
Date
How do I declare a constant in shell script?
Bash
Shell
Expand a possible relative path in bash
Linux
Bash
Absolute Path
How to obtain the first letter in a Bash variable?
Bash
Text Processing
Variable Expansion
How to perform a for loop on each character in a string in Bash?
Bash
For Loop
Loop background job
Bash
Shell script read missing last line
Bash
Process
Bash Shell Script - Check for a flag and grab its value
Linux
Bash
Shell
Debian
How do I get the last word in each line with bash
Linux
Bash
What are the differences between a login shell and interactive shell?
Bash
Shell
Interactive Shell
How do I launch a Git Bash window with particular working directory using a script?
Bash
Shell
Batch File
Git Bash
Recursively find files with a specific extension
Linux
Bash
What do $? $0 $1 $2 mean in shell script?
Bash
Shell
Ash
Jq to replace text directly on file (like sed -i)
Bash
Jq
In Place
Edit in-Place
Bash autocompletion in Emacs shell-mode
Bash
Shell
Emacs
Autocomplete
How do I assign the output of a command into an array?
Arrays
Bash
Command Substitution
Take the first command line argument and pass the rest
Bash
Return value in a Bash function
Bash
Function
Return Value
Pipe output and capture exit status in Bash
Bash
Shell
Error Handling
Pipe
How to get the last part of dirname in Bash
Bash
Shell
Dirname
Exec commands on kubernetes pods with root access
Bash
Docker
Kubernetes
Running a command in a new Mac OS X Terminal window
Macos
Bash
Terminal
What is indirect expansion? What does ${!var*} mean?
Bash
Indirection
How to give arguments to kill via pipe
Linux
Bash
Shell
Command Line
Command Line-Arguments
How to get the difference (only additions) between two files in linux
Linux
Bash
Diff
What does "-ne" mean in bash?
Bash
Shell
Syntax
How to pipe input to a Bash while loop and preserve variables after loop ends
Bash
While Loop
Stdin
Pipe
Gulp command not found after install
Macos
Bash
Terminal
Npm
Gulp
Difference between Git GUI, Git Bash, Git CMD
Git
Bash
Cmd
How to check the exit status using an 'if' statement
Bash
Shell
If Statement
Error Handling
Exit Code
Running multiple commands in one line in shell
Bash
Shell
Can a Bash tab-completion script be used in zsh?
Bash
Zsh
Tab Completion
find difference between two text files with one item per line
Bash
File
Scripting
Sed
Awk
How can I show the wget progress bar only?
Linux
Bash
Wget
Sh
Script to get the HTTP status code of a list of urls?
Bash
Curl
Http Status-Codes
VIM: how to go to exact line on Ubuntu
Linux
Bash
Vim
Ubuntu
Terminal
Git autocomplete in bash aliases?
Git
Bash
Is there a way to write a Bash function which aborts the whole execution, no matter how it is called?
Bash
Function
Exit
Subshell
What's the meaning of the parameter -e for bash shell command line?
Bash
Shell
Why sudo cat gives a Permission denied but sudo vim works fine?
Bash
Shell
Echo
Cat
How to pass array as an argument to a function in Bash
Arrays
Bash
Shell
How can I check the first character in a string in Bash or Unix shell?
String
Bash
Unix
Character
Exitstatus
How to hide wget output in Linux?
Linux
Bash
Wget
Difference between terms: "option", "argument", and "parameter"?
Bash
Shell
Parameters
Arguments
Option
How to execute ssh-keygen without prompt
Linux
Bash
Shell
Ssh
docker error : the input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty'
Windows
Bash
Git
Docker
Tty
Checking for environment variables
Linux
Bash
Shell
How do I do if statement arithmetic in bash?
Bash
Scripting
What is a simple explanation for how pipes work in Bash?
Bash
Pipe
How do I timestamp every ping result?
Bash
Osx Lion
Ping
Bsd
How do I remove the file suffix and path portion from a path string in Bash?
String
Bash
Filenames
Using getopts to process long and short command line options
Bash
Command Line-Arguments
Getopt
Getopts
An example of how to use getopts in bash
Bash
Shell
Getopts
Take nth column in a text file
Linux
Bash
How do I get the absolute directory of a file in bash?
Linux
Bash
Shell
How to run a script at a certain time on Linux?
Linux
Bash
Scripting
Debian
Using dot or "source" while calling another script - what is the difference?
Bash
Dot Source
Double parenthesis with and without dollar
Bash
How can I make all line endings (EOLs) in all files in Visual Studio Code, Unix-like?
Windows
Bash
Visual Studio-Code
Editor
Line Endings
Usage of :- (colon dash) in bash
Bash
Syntax
Capture stdout and stderr into different variables
Bash
Shell
Command Line
Io Redirection
Getting "sed error - illegal byte sequence" (in bash)
Bash
Sed
Using the && operator in an if statement
Bash
If Statement
Syntax
Operators
Unset readonly variable in bash
Bash
Unset
Setting an environment variable before a command in Bash is not working for the second command in a pipe
Bash
Environment Variables
What's the difference between [ and [[ in Bash?
Bash
Capturing Groups From a Grep RegEx
Bash
Shell
Grep
How to use patterns in a case statement?
Bash
Case Statement
What are the differences between using the terminal on a mac vs linux?
Macos
Bash
Shell
Ubuntu
Terminal
Adding timestamp to a filename with mv in BASH
Linux
Bash
How to add to the end of lines containing a pattern with sed or awk?
Bash
Sed
Awk
How to remove all white spaces from a given text file
Linux
Bash
Sed
Use sudo with password as parameter
Linux
Bash
Sudo
How to remove non UTF-8 characters from text file
Linux
Bash
Text
Utf 8
Character Encoding
How to declare 2D array in bash
Linux
Bash
Shell
Find multiple files and rename them in Linux
Linux
Bash
Shell
Scripting
Suse
exit with error message in bash (oneline)
Bash
Message
Exit
How to remove (base) from terminal prompt after updating conda
Bash
Terminal
Anaconda
Conda
Miniconda
use regular expression in if-condition in bash
Regex
Bash
Linux how to copy but not overwrite?
Linux
Bash
Cp
Highlight Bash/shell code in Markdown files
Bash
Shell
Markdown
Github Flavored-Markdown
How to assign a heredoc value to a variable in Bash?
Bash
Heredoc
How to execute mongo commands through shell scripts?
Mongodb
Bash
Shell
Sh
Git Bash is extremely slow on Windows 7 x64
Git
Bash
Windows 7
Msysgit
Mingw32
grep for multiple strings in file on different lines (ie. whole file, not line based search)?
Bash
Awk
Grep
Bash CTRL to move cursor between words/strings
Bash
Running bash commands in the background without printing job and process ids
Bash
Bash Completion
Groups of compound conditions in Bash test
Bash
If Statement
How can I call 'git pull' from within Python?
Python
Git
Bash
Github
Indenting multi-line output in a shell script
Linux
Bash
Shell
Bash keyboard shortcuts in iTerm like Alt+d and Alt+f
Macos
Bash
Keyboard Shortcuts
Iterm
Iterm2
cut or awk command to print first field of first row
Linux
Bash
Unix
Awk
Value too great for base (error token is "08")
Bash
Shell
How do I use Bash on Ubuntu on Windows (WSL) for my VS Code terminal?
Git
Bash
Ubuntu
Visual Studio-Code
Windows Subsystem-for-Linux
find -mtime files older than 1 hour
Bash
Shell
Command Line
Cron
How to embed bash script directly inside a git alias
Git
Bash
Shell
Alias
Best way to make a shell script daemon?
Bash
Shell
Daemon
How to get only the first ten bytes of a binary file
Bash
Binary
Recursively rename files using find and sed
Bash
Scripting
Sed
Find
Replace
How to extract duration time from ffmpeg output?
Linux
Bash
Ffmpeg
How can I count the occurrences of a string within a file?
Bash
Search
Use Bash to read line by line and keep space
Bash
How to determine SSL cert expiration date from a PEM encoded certificate?
Linux
Bash
Ssl
Openssl
Certificate
How can I kill a process by name instead of PID, on Linux?
Linux
Bash
Shell
Kill
How do I create a configure script?
Linux
Bash
Makefile
Configure
sed insert line with spaces to a specific line
Linux
Bash
Sed
How to copy an array in Bash?
Arrays
Bash
Copy
Backticks vs braces in Bash
Bash
Command Substitution
How to count lines of code including sub-directories
Linux
Bash
Unix
Wc
Nth word in a string variable
Bash
Include additional files in .bashrc
Linux
Shell
Command Line
Bash
Why doesn't my bash prompt update?
Git
Bash
Ps1
When are square brackets required in a Bash if statement?
Bash
If Statement
Square Bracket
Capture multiline output as array in bash
Bash
How can I get the current user's username in Bash?
Bash
A semantics for Bash scripts?
Bash
What does &> do in bash?
Bash
counting duplicates in a sorted sequence using command line tools
Bash
Command Line
Sorting
Count
Duplicates
How do I escape slashes and double and single quotes in sed?
Bash
Sed
'+' (one or more occurrences) not working with 'sed' command
Macos
Bash
Sed
Unix shell script to truncate a large file
Bash
Shell
Truncate
Bash regex =~ operator
Bash
Shell
Unix
Split bash string by newline characters
String
Bash
Shell
change json file by bash script
Json
Bash
Running Openssl from a bash script on windows - Subject does not start with '/'
Windows
String
Bash
Openssl
How to urlencode data for curl command?
Bash
Shell
Curl
Scripting
Urlencode
./configure : /bin/sh^M : bad interpreter
Linux
Bash
Shell
Newline
Bash command to sum a column of numbers
Bash
Padding zeros in a string
Bash
How to split a file and keep the first line in each of the pieces?
Linux
Bash
File
Shell
Text
Arrays in unix shell?
Arrays
Bash
Shell
Unix
Associative arrays: error "declare: -A: invalid option"
Bash
Associative Array
Execute a shell function with timeout
Bash
Function
Shell
Timeout
Run parallel multiple commands at once in the same terminal
Linux
Bash
Overwrite last line on terminal
Bash
Terminal
Escaping
Pipe output to bash function
Linux
Bash
Pipe
How to find file accessed/created just few minutes ago
Linux
Bash
Shell
Unix
Find
How to get file creation date/time in Bash/Debian?
Linux
Bash
Shell
Debian
Ls
How to enter ssh password using bash?
Bash
Ssh
How to execute a remote command over ssh with arguments?
Linux
Bash
Ssh
How can I compare a string to multiple correct values in Bash?
String
Bash
Comparison
Compare
How can I remove the last character of a file in unix?
Linux
Bash
Unix
Sed
Check if image:tag combination already exists on docker hub
Bash
Docker
Dockerhub
How can I count all the lines of code in a directory recursively?
Bash
Shell
Looping through the content of a file in Bash
Linux
Bash
Loops
Unix
Io
How to redirect and append both standard output and standard error to a file with Bash
Bash
Append
Stdout
Io Redirection
Stderr
What does -z mean in Bash?
Bash
Get just the filename from a path in a Bash script
Bash
Scripting
Shell
How to remove double-quotes in jq output for parsing json files in bash?
Bash
Awk
Sed
Jq
.bashrc at ssh login
Ubuntu
Ssh
Bash
How to use grep to get anything just after `name=`?
Regex
Bash
Grep
How do I merge one directory into another using Bash?
Bash
Shell
Scripting
Command Line
Sh
Bash prompt with the last exit code
Linux
Bash
Prompt
Ignoring specific errors in a shell script
Bash
Shell
Error Handling
Can ${var} parameter expansion expressions be nested in bash?
Bash
kill a process in bash
Bash
What are my environment variables?
Linux
Bash
Shell
Ubuntu
How to cut first n and last n columns?
Linux
Bash
Shell
In bash, is there an equivalent of die "error msg"
Bash
Shell
gpg encrypt file without keyboard interaction
Bash
Crontab
Gnupg
SCP doesn't work when echo in .bashrc?
Bash
Ssh
Scp
Capture stdout to a variable but still display it in the console
Bash
Ubuntu
Tee
Process Substitution
Command output redirect to file and terminal
Linux
Bash
Redirect
recursively use scp but excluding some folders
Bash
Scp
How to avoid bash command substitution to remove the newline character?
Bash
Newline
Command Substitution
How to remove entry from $PATH on mac
Macos
Bash
Terminal
.Bash Profile
Path Variables
Count line lengths in file using command line tools
Bash
Shell
Command Line
Scripting
Getting "command not found" error while comparing two strings in Bash
String
Bash
If Statement
Syntax
Compare
How to run MySQL command on bash?
Mysql
Bash
Unix
Terminal
Special Characters
Get current time in hours and minutes
Linux
Bash
Time
Insert multiple lines into a file after specified pattern using shell script
Linux
Bash
Shell
Sed
Awk
Fixing a systemd service 203/EXEC failure (no such file or directory)
Bash
Systemd
How can I send the stdout of one process to multiple processes using (preferably unnamed) pipes in Unix (or Windows)?
Windows
Bash
Unix
Shell
Pipe
Bash Scripting - How to set the group that new files will be created with?
Linux
Bash
Unix
Shell
Permissions
How to build a conditional assignment in bash?
Bash
Unlimited Bash History
Bash
Unix
What is the purpose of "&&" in a shell command?
Bash
Shell
Command Line
Syntax
How to find the last field using 'cut'
Linux
Bash
Cut
Get program execution time in the shell
Linux
Bash
Shell
How to find processes based on port and kill them all?
Bash
Shell
Bash script to convert from HTML entities to characters
Html
Bash
Html Escape-Characters
Automating telnet session using bash scripts
Linux
Bash
Automation
Telnet
Explanation of colon operator in ": ${foo=value}"
Bash
What is the 'function' keyword used in some bash scripts?
Bash
shell script to kill the process listening on port 3000?
Linux
Bash
Sockets
Kill
What exactly is sudo bang bang?
Linux
Bash
Terminal
Sh
How to load ~/.bash_profile when entering bash from within zsh?
Bash
Macos
Shell
Zsh
Zshrc
How to detect if docker run succeeded programmatically?
Bash
Docker
How can I find a file/directory that could be anywhere on linux command line?
Linux
Bash
Find
Ksh
Locate
Failed to activate virtualenv with pyenv
Python
Bash
Virtualenv
Pyenv
Multiple Bash traps for the same signal
Bash
Bash Trap
How to put a line comment for a multi-line command
Bash
Shell
Comments
Exception handling in shell scripting?
Bash
Shell
Exception Handling
How can I make bash tab completion behave like vim tab completion and cycle through matching matches?
Bash
Shell
Vim
grep --ignore-case --only
Regex
Bash
Unix
Grep
Gnu
unix - count of columns in file
Linux
Bash
Shell
Unix
Scripting
Is mixing getopts with positional parameters possible?
Bash
Shell
Parameters
How do I test (in one line) if command output contains a certain string?
Bash
Using cut command to remove multiple columns
Bash
Cut
How to use variables in a bash for loop
Linux
Bash
For Loop
Checking host availability by using ping in bash scripts
Bash
Networking
Ping
Connectivity
How to store command results in a shell variable?
Bash
Shell
Why is "MINGW64" appearing on my Git bash?
Windows
Git
Bash
Mingw W64
Add new element to existing JSON array with jq
Arrays
Json
Bash
Jq
How do I use regular expressions in bash scripts?
Regex
Bash
Conditional
How to get the nth positional argument in bash?
Bash
Arguments
Command Line-Arguments
How to highlight Bash scripts in Vim?
Linux
Bash
Vim
Syntax Highlighting
Vim Syntax-Highlighting
Pseudo-terminal will not be allocated because stdin is not a terminal
Linux
Bash
Shell
Ssh
What is the proper way to test a Bash function's return value?
Bash
Function
Syntax
How do file descriptors work?
Bash
Shell
Stdout
Stdin
File Descriptor
Trying to retrieve first 5 characters from string in bash error?
Bash
Shell
.bash_history does not update in Git for Windows (git bash)
Windows
Git
Bash
Git Bash
setting tabwidth to 4 in git show / git diff
Git
Bash
Tabs
Whitespace
Spaces
How to show zsh function definition (like bash "type myfunc")?
Bash
Function
Zsh
Definition
How to split path by last slash?
Bash
Split
shopt command not found in .bashrc after shell updation
Bash
Sh
Zshrc
Shopt
How to get script directory in POSIX sh?
Bash
Posix
Sh
Bash checking if string does not contain other string
Bash
Escape dollar sign in string by shell script
Bash
Shell
access host's ssh tunnel from docker container
Bash
Ssh
Docker
Netcat
Ssh Tunnel
How to check for presence of 'key' in jq before iterating over the values
Json
Bash
Jq
How to run 'cd' in shell script and stay there after script finishes?
Bash
Shell
Cd
Pwd
Passing parameters to bash when executing a script fetched by curl
Bash
Curl
Parameter Passing
Simple Socket Server in Bash?
Linux
Bash
Sockets
Tcp
in linux terminal, how do I show the folder's last modification date, taking its content into consideration?
Linux
Bash
Shell
Scripting
Ubuntu
Parallel wget in Bash
Bash
Parallel Processing
Wget
Don't save current bash session to history
Bash
How to start a shell without any user configuration?
Linux
Macos
Bash
Shell
Execute bash commands from a Rakefile
Ruby
Bash
Rake
bash echo number of lines of file given in a bash variable without the file name
Bash
Wc
Create file with contents from shell script
Bash
Shell
Check if an element is present in a Bash array
Arrays
Bash
Shell
Search
How can I count the number of characters in a Bash variable
Linux
Bash
reverse the order of characters in a string
Bash
Running Bash commands in Python
Python
Bash
How to pass in password to pg_dump?
Bash
Postgresql
Shell
Crontab
How can I format my grep output to show line numbers at the end of the line, and also the hit count?
Linux
Bash
Unix
Grep
How best to include other scripts?
Bash
if, elif, else statement issues in Bash
Bash
If Statement
Prevent grep returning an error when input doesn't match
Bash
Grep
Test for empty string with X""
String
Bash
Shell
Posix
How to check that a parameter was supplied to a bash script
Bash
Difference between $HOME and '~' (tilde)?
Linux
Bash
Centos
Test whether a directory exists inside a makefile
Bash
Makefile
firebase-tools "-bash: firebase: command not found"
Bash
Firebase
Are shell scripts sensitive to encoding and line endings?
Bash
Shell
Sh
bash regex with quotes?
Regex
Bash
Quotes
What's the cmd/PowerShell equivalent of back tick on Bash?
Bash
Powershell
Cmd
Mutable list or array structure in Bash? How can I easily append to it?
Arrays
Bash
Scripting
How to find out where alias (in the bash sense) is defined when running Terminal in Mac OS X
Terminal
Alias
Bash
How to find all file extensions recursively from a directory?
Bash
Terminal
Grep
How to send control+c from a bash script?
Bash
Gnu Screen
How to iterate over associative arrays in Bash
Bash
Associative Array
Key Value
Bash4
What is the cleanest way to ssh and run multiple commands in Bash?
Bash
Unix
Ssh
What is the purpose of the : (colon) GNU Bash builtin?
Bash
Shell
Built In
How to check if running in Cygwin, Mac or Linux?
Bash
Shell
Cross Platform
Cygwin
Accessing bash command line args $@ vs $*
Bash
Command Line-Arguments
What is the meaning of ${0%/*} in a bash script?
Bash
Scripting
Limit on file name length in bash
Linux
Bash
File
Maxlength
Fastest possible grep
Bash
Unix
Grep
How to print a function definition in Bash?
Bash
store return value of a Python script in a bash script
Python
Bash
Return
Return Value
Bash script error: "function: not found". Why would this appear?
Bash
Shell
Unix
Ubuntu
Terminal
Difference between parentheses and brackets in Bash conditionals
Bash
If Statement
Randomly shuffling lines in Linux / Bash
Linux
Bash
Shell
Sh
Move whole line up/down shortcut in nano (analogue to intelliJ or Visual Studio)
Linux
Bash
Editor
Nano
How do I use a pipe in the exec parameter for a find command?
Bash
Shell
Find
Setting environment variables in Linux using Bash
Linux
Bash
Unix
Shell
Run bash script from Windows PowerShell
Bash
Powershell
Capturing output of find . -print0 into a bash array
Arrays
Bash
Null
Find
Delimiter
LINES and COLUMNS environmental variables lost in a script
Bash
Shell
Terminal
Environment Variables
bash, Linux: Set difference between two text files
Bash
File Io
Set Difference
xargs with multiple arguments
Linux
Bash
Shell
Command Line-Arguments
Xargs
Replacement for source in sh
Bash
Shell
Sh
Dot Source
How to make "if not true condition"?
Bash
If Statement
Syntax
Boolean Expression
Check folder size in Bash
Bash
Shell
Directory
Extract file basename without path and extension in bash
Linux
Bash
Unix
Filenames
Is there a better way to run a command N times in bash?
Bash
Loops
Can I export a variable to the environment from a Bash script without sourcing it?
Bash
Shell
Unix
Environment Variables
Using bash history to get a previous command, copy it and then 'run' it but with the command commented
Linux
Bash
Command Line
Case statement fallthrough?
Bash
Why piping input to "read" only works when fed into "while read ..." construct?
Bash
While Loop
Pipe
Piping
Get the index of a value in a Bash array
Arrays
Bash
Indexing
Source files in a bash script
Bash
Shell
Ubuntu
sed plus sign doesn't work
Regex
Bash
Sed
chmod WSL (Bash) doesn't work
Bash
Windows 10
Chmod
Windows Subsystem-for-Linux
How to Fix Permissions on Home-brew on MacOS High Sierra
Python
Bash
Homebrew
Parse Date in Bash
Bash
Date
Parsing
Compare/Difference of two arrays in Bash
Arrays
Bash
Diff
Compare
How to convert DOS/Windows newline (CRLF) to Unix newline (LF) in a Bash script
Linux
Windows
Bash
Unix
Newline
How to test if string exists in file with Bash?
String
Bash
File
How can I read documentation about built in zsh commands?
Linux
Bash
Zsh
Built In
diff a directory recursively, ignoring all binary files
Bash
Shell
Diff
Binaryfiles
How to escape a single quote in single quote string in Bash?
Linux
Bash
Escaping
Shell/Bash shortcut for bulk renaming of files in a folder
Linux
Bash
File Io
Scripting
How to use Bash read with a timeout?
Bash
Io
Timeout
Read tab-separated file line into array
Arrays
Bash
Command line arguments in Bash
Bash
Command Line-Arguments
How to remove space from string?
Bash
Shell
When setting IFS to split on newlines, why is it necessary to include a backspace?
Linux
Bash
-bash: export: `=': not a valid identifier
Macos
Bash
Terminal
Export
Execute a shell script in current shell with sudo permission
Linux
Bash
Shell
Permissions
Sudo
sudo cat << EOF > File doesn't work, sudo su does
Bash
Shell
Sudo
Rename multiple files, but only rename part of the filename in Bash
Bash
File Rename
Redirecting command output in docker
Linux
Bash
Logging
Docker
Output
What does "|&" mean in Bash?
Bash
Run bash command on jenkins pipeline
Linux
Bash
Shell
Jenkins
Groovy
How to Export a Multi-line Environment Variable in Bash/Terminal e.g: RSA Private Key
Bash
Shell
Environment Variables
Multiline
Private Key
Check existence of input argument in a Bash shell script
Bash
Shell
How do I prompt for Yes/No/Cancel input in a Linux shell script?
Linux
Bash
Shell
Scripting
Difference between sh and Bash
Bash
Shell
Unix
Sh
How to generate random number in Bash?
Bash
Shell
Random
Stop on first error
Bash
How to limit depth for recursive file list?
Linux
Bash
How can I process the results of find in a bash script?
Bash
Find
pipe stdout and stderr to two different processes in shell script?
Bash
Shell
Pipe
Io Redirection
Why should there be spaces around '[' and ']' in Bash?
Bash
If Statement
Syntax
How to get shell to self-detect using zsh or bash
Bash
Zsh
Sh
Escaping characters in bash (for JSON)
Json
Bash
Escaping
How do I add ~/bin to my path?
Macos
Bash
Sublimetext
How does the leading dollar sign affect single quotes in Bash?
Bash
Quotes
Double Quotes
Single Quotes
Shell script to capture Process ID and kill it if exist
Bash
Shell
Scripting
How to pass argument in Expect through the command line in a shell script
Linux
Bash
Shell
Expect
Recreating PyCharm launcher in Ubuntu
Bash
Ubuntu
Pycharm
bash, extract string before a colon
Regex
String
Bash
Sed
Substring
How to open google chrome from terminal?
Git
Bash
Google Chrome
Terminal
Alias
Can I pass a string variable to jq not the file?
Json
Bash
Variables
Input
Jq
Remove the last line from a file in Bash
Bash
Command Line
Scripting
Truncate
How to get the primary IP address of the local machine on Linux and OS X?
Bash
Unix
Ip
Ifconfig
How to find out line-endings in a text file?
Linux
Bash
Command Line
Newline
Line Endings
Echo tab characters in bash script
Bash
Tabs
Echo
Spaces
Using the passwd command from within a shell script
Linux
Bash
Unix
Shell
Is there any use for Bash scripting anymore?
Python
Perl
Bash
Scripting
Comparison
-bash: syntax error near unexpected token `newline'
Bash
Syntax
Newline
Token
Bash script log file display to screen continuously
Linux
Bash
Logging
sed substitution with Bash variables
Bash
Sed
Substitution
What do the -n and -a options do in a bash if statement?
Bash
Execute current line in Bash from Vim
Bash
Vim
Linux find and grep command together
Bash
Grep
Find
how to detect invalid utf8 unicode/binary in a text file
Linux
Bash
Utf 8
Character Encoding
Package management in Git for Windows (Git Bash)?
Windows
Git
Bash
Msysgit
Msys
Tar a directory, but don't store full absolute paths in the archive
Linux
Bash
Backup
Tar
Kubernetes: how to debug CrashLoopBackOff
Bash
Docker
Kubernetes
How can I append text to /etc/apt/sources.list from the command line?
Bash
How do you call a function defined in .bashrc from the shell?
Bash
Function
Shell
Bash: using the result of a diff in a if statement
Bash
Diff
How do I get bc(1) to print the leading zero?
Bash
Unix
Bc
Reading filenames into an array
Bash
Unix
Cygwin
Conversion hex string into ascii in bash command line
Bash
Hex
Linux Terminal: typing feedback gone, line breaks not displayed
Linux
Bash
Terminal
Putty
Gnome Terminal
Running multiple commands with xargs
Bash
Xargs
Linux why can't I pipe find result to rm?
Linux
Bash
Find
Pipe
Rm
Is bash a programming language?
Bash
How not to pass the locale through an ssh connection command
Bash
Ssh
How to write a shell script that starts tmux session, and then runs a ruby script
Ruby
Bash
Shell
Tmux
How to get a random string of 32 hexadecimal digits through command line?
Bash
Random
What's the meaning of a ! before a command in the shell?
Linux
Bash
Shell
Unix
Sh
How to read mutliline input from stdin into variable and how to print one out in shell(sh,bash)?
Bash
Shell
Stdin
Multiline
How to remove files starting with double hyphen?
Bash
Unix
Filenames
Wait for bash background jobs in script to be finished
Bash
Scripting
Job Control
Extract parameters before last parameter in "$@"
Bash
Parameters
Which shortcut in Zsh does the same as Ctrl-U in Bash?
Bash
Zsh
Custom format for time command
Bash
Shell
Time
Format
Bash scripts with tmux to launch a 4-paned window
Bash
Exec
Tmux
linux find regex
Regex
Linux
Bash
Unix
Find
Execute command on all files in a directory
Bash
Scripting
Exit Shell Script Based on Process Exit Code
Bash
Shell
Command to get time in milliseconds
Linux
Bash
Shell
Time
Run bash commands from txt file
Linux
File
Bash
Repeat last command with "sudo"
Bash
How can I make a bash command run periodically?
Bash
How can I execute a group of commands as another user in Bash?
Bash
Su
How can I split one text file into multiple *.txt files?
Linux
Bash
Bash: Capture output of command run in background
Bash
Delete all broken symbolic links with a line?
Bash
Shell
Unix
Symlink
jq: output array of json objects
Bash
Jq
Using the result of a command as an argument in bash?
Bash
Command Line
How to ssh from within a bash script?
Bash
Ssh
How to set an alias inside a bash shell script so that is it visible from the outside?
Bash
Using `find -perm` to find when a permission is not set
Linux
Bash
Find
How does Ctrl-C terminate a child process?
Bash
Shell
Process
Sh
Correct way to check Java version from BASH script
Java
Bash
Version
Dependency Management
List files not matching a pattern?
Bash
Wildcard
Glob
Ls
Run text file as commands in Bash
Linux
Bash
Ubuntu
Terminal
Command
Open an .html file with default browser using Bash on Mac
Html
Macos
Bash
Browser
Applescript
Difference between 'if -e' and 'if -f'
Bash
If Statement
what does "bash:no job control in this shell” mean?
Linux
Bash
Sorting strings with numbers in Bash
Bash
Sorting
Alphanumeric
How can I redirect all output to /dev/null?
Bash
Pipe
Output Redirect
Dev Null
PostgreSQL - query from bash script as database user 'postgres'
Sql
Bash
Postgresql
How to get $HOME directory when switching to a different user in bash?
Bash
How to wait for an open port with netcat?
Bash
Shell
Netcat
Searching your command history on macOS terminal
Bash
Macos
History
How do you run a script on login in *nix?
Linux
Bash
Macos
Unix
Shell
Hidden features of Bash
Bash
Shell
Scripting
Hidden Features
How to make a GUI for bash scripts?
User Interface
Bash
Gtk
Tcl
Tk
How do you run multiple programs in parallel from a bash script?
Bash
Parallel Processing
sed command with -i option failing on Mac, but works on Linux
Linux
Macos
Bash
Sed
What does `set -x` do?
Linux
Bash
Unix
Scripting
Select objects based on value of variable in object using jq
Json
Bash
Select
Jq
How to represent multiple conditions in a shell if statement?
Bash
Shell
Unix
Rename files using a regex with bash
Regex
Bash
Listing the content of a tar file or a directory only down to some level
Bash
Tar
Ls
Depth
What is the difference between "$@" and "$*" in Bash?
Bash
Variables
Command Line-Arguments
executing shell command in background from script
Bash
Unix
Shell
bash: silently kill background function process
Linux
Bash
Shell
Unix
Scripting
How to decode URL-encoded string in shell?
Bash
Shell
Awk
Sed
Urldecode
"CLS" Equivalent in BASH?
Bash
Terminal
Binary Data Posting with curl
Bash
Post
Curl
Dotnetnuke
Binary Data
grep only text files
Bash
Grep
Using Bash to display a progress indicator
Bash
Shell
Unix
Progress
Adding Counter in shell script
Bash
Shell
Bash expand variable in a variable
Bash
-bash: __git_ps1: command not found
Bash
Shell
Command
Git Bash
Ruby 2.0
How can I list the files in a zip archive without decompressing it?
Linux
Bash
Shell
Unix
Zip
OS X Bash, 'watch' command
Macos
Bash
Automation
Watch
How to check if running as root in a bash script
Bash
Shell
Root
How to run jq from gitbash in windows?
Bash
Jq
Git Bash
Is it possible to detect 32 bit vs 64 bit in a bash script?
Bash
How to prevent a script from running simultaneously?
Bash
Semaphore
bash if -a vs -e option
Bash
Why is '#!/usr/bin/env python' supposedly more correct than just '#!/usr/bin/python'?
Python
Bash
Print a character repeatedly in bash
Bash
Shell
What are the error exit values for diff?
Bash
Shell
Diff
Exit Code
Retrieving multiple arguments for a single option using getopts in Bash
Bash
Command Line-Arguments
Getopts
Modifying replace string in xargs
Bash
Xargs
Is there a way to avoid positional arguments in bash?
Bash
Shell
Scripting
Meaning of "=~" operator in shell script
Regex
Linux
Bash
Shell
Replacing some characters in a string with another character
String
Bash
Use space as a delimiter with cut command
Bash
Unix
Cut
How can I recall the argument of the previous bash command?
Linux
Bash
Unix
Command
How to check if an environment variable exists and get its value?
Bash
Shell
Concatenating multiple text files into a single file in Bash
Bash
Shell
Shell Script: How to write a string to file and to stdout on console?
Bash
Shell
Command Line
Sh
Ksh
"Couldn't find a file descriptor referring to the console" on Ubuntu bash on Windows
Linux
Windows
Bash
Ubuntu
Terminal
embedding short python scripts inside a bash script
Python
Bash
Unable to modify git bash Windows shortcut
Git
Bash
Windows 7
fork and exec in bash
Linux
Bash
Scripting
Shell
How to schedule to run first Sunday of every month
Bash
Shell
Cron
Redhat
How do you return to a sourced bash script?
Bash
Subprocess
Return
Exit
PS1 line with Git current branch and colors
Git
Command Prompt
Bash
How do I add a line break for read command?
Bash
Shell
Unix
Exporting an array in bash script
Arrays
Bash
Export
Using the RUN instruction in a Dockerfile with 'source' does not work
Bash
Shell
Docker
Can I use sed to manipulate a variable in bash?
Bash
Replace
Sed
Where is the default terminal $PATH located on Mac?
Macos
Bash
Path
Pipe multiple commands into a single command
Bash
Shell
Process
Pipe
Subshell
How to run a vim command from the shell command-line?
Bash
Shell
Vim
Zsh
Run one command after another, even if I suspend the first one (Ctrl-z)
Bash
Shell
Command
Signals
Suspend
What is the difference between using `sh` and `source`?
Linux
Bash
Shell
Unix
File size in human readable format
Linux
Bash
What is the difference between Git Bash and the GitHub for Windows shell?
Git
Bash
Github
How to make OS X to read .bash_profile not .profile file
Macos
Bash
Why can't Git Bash run my executable?
Windows
Git
Bash
Mingw W64
Msys2
Ansible: How to chmod +x a file with Ansible?
Bash
Ansible
How to suppress Terminated message after killing in bash?
Bash
Unix
Shell
Make a Bash alias that takes a parameter?
Bash
Alias
How to convert a string to lower case in Bash?
String
Bash
Shell
Lowercase
How to specify the private SSH-key to use when executing shell command on Git?
Git
Bash
Shell
Ssh
How to convert hex to ASCII characters in the Linux shell?
Linux
Bash
Shell
Encoding
Scripting
Round a divided number in Bash
Linux
Bash
Math
Shell
Rounding
How to parse XML using shellscript?
Linux
Bash
Shell
Using command line argument range in bash for loop prints brackets containing the arguments
Bash
Command Line
Loops
For Loop
Arguments
Remove function definition (unalias equivalent)
Bash
Shell
Zsh
Start script after another one (already running) finishes
Linux
Bash
Process
Are there any languages that compile to Bash?
Bash
Shell
Scripting
Coffeescript
"git add" using wildcard is not functioning as I hoped - must I cd into specific directories?
Git
Bash
Wildcard
does linux shell support list data structure?
Linux
Bash
Shell
Ash
Use of apostrophe (single-quote) in a Git commit message via command line
Git
Bash
Escaping
Bash get exit status of command when 'set -e' is active?
Bash
Where do you keep your own scripts on OSX?
Macos
Bash
Terminal
Mac OS X 10.9 - setting permanent environment variables
Macos
Bash
Environment Variables
Osx Mavericks
How can I use inverse or negative wildcards when pattern matching in a unix/linux shell?
Bash
Shell
Pattern Matching
Glob
How to compile executable for Windows with GCC with Linux Subsystem?
C
Bash
Gcc
Run a script in the same directory as the current script
Bash
Path
Filepath
How do you extract IP addresses from files using a regex in a linux shell?
Regex
Linux
Bash
Unix
Command Line
How can I upload (FTP) files to server in a Bash script?
Bash
Ftp
Bash: Split string into character array
String
Bash
How do I use shell variables in an awk script?
Bash
Shell
Awk
Using `date` command to get previous, current and next month
Linux
Bash
Unix
Date
How to retrieve the first n characters of a variable in Bash?
Bash
How to cd into a directory with space in the name?
Bash
Cygwin
Cd
Exit code of variable assignment to command substitution in Bash
Linux
Bash
Shell
Exit Code
How do you print received cookie info to stdout with curl?
Bash
Unix
Cookies
Curl
Recursively cat all the files into single file
Linux
Bash
Unix
Grep
Cat
is there an escape character for envsubst?
Bash
Shell
Envsubst
What does the colon dash ":-" mean in bash
Bash
Shell
Syntax
Semantics
How to get ip address of a server on Centos 7 in bash
Bash
Ip Address
Centos7
How do you kill all Linux processes that are older than a certain age?
Linux
Bash
Unix
Process
Bash or KornShell (ksh)?
Bash
Shell
Unix
Scripting
Ksh
Saving current directory to bash history
Bash
What is the meaning of the ${0##...} syntax with variable, braces and hash character in bash?
Bash
Variables
Syntax
Curly Braces
How can I escape a double quote inside double quotes?
Bash
Quotes
How can I format the output of a bash command in neat columns
Bash
Awk
Zsh
Convert date formats in bash
Linux
Bash
Date
Awk
Bash - what's the use of "fi ;;"?
Bash
If Statement
File name without extension in bash for loop
Bash
How to create md5 hash in bash in Mac OS X
Macos
Bash
Cryptography
Date command does not follow Linux specifications (Mac OS X Lion)
Macos
Bash
Date
Scripting
Porting
Deleting files after adding to tar archive
Bash
Unix
Compression
Tar
Convert seconds to hours, minutes, seconds
Bash
How to use SED to find and replace URL strings with the "/" character in the targeted strings?
Bash
Sed
Escaping
Git Checkout Latest Tag
Git
Bash
Shell
Tags
running multiple bash commands with subprocess
Python
Bash
Subprocess
When grep "\\" XXFile I got "Trailing Backslash"
Linux
Bash
Shell
Grep
Boolean operators ( &&, -a, ||, -o ) in Bash
Bash
Shell
Unix
Boolean
Operators
Bash, grep between two lines with specified string
Regex
Bash
Grep
Explaining the 'find -mtime' command
Linux
Bash
Find
How to check if a file contains a specific string using Bash
Bash
Shell
Grep
xargs doesn't recognize bash aliases
Command Line
Xargs
Bash
rm fails to delete files by wildcard from a script, but works from a shell prompt
Linux
Bash
Shell
Shortest way to swap two files in bash
Linux
Bash
Command Line
How to get the PID of a process that is piped to another process in Bash?
Bash
Pipe
Pid
Avoid gnome-terminal close after script execution?
Linux
Bash
Shell
Ssh
Why does "local" sweep the return code of a command?
Bash
Shell
Local
How do I know if I'm running a nested shell?
Linux
Bash
Shell
Unix
Using bash, how do you make a classpath out of all files in a directory?
Java
Bash
File
Directory
Classpath
How can I cd to an alias directory in the Mac OSX terminal
Macos
Bash
How to define a function inside another function in Bash?
Bash
ANSI color in git is not displayed correctly
Git
Bash
How to get arguments with flags in Bash
Bash
Shell
Recursive copy of a specific file type maintaining the file structure in Unix/Linux?
Linux
Bash
Shell
Rsync
Cp
How can I copy several binary files into one file on a Linux system?
Bash
Binary
Copy
Run Bash Command from PHP
Php
Bash
Exec
Moving large number of files
Bash
Waiting for background processes to finish before exiting script
Bash
Shell
Unix
Tcl
Grep
Shell - check if a git tag exists in an if/else statement
Git
Bash
Shell
How to set a variable to current date and date-1 in linux?
Linux
Bash
Date
Concatenate in bash the output of two commands without newline character
Regex
Bash
Sed
Pipe
Concatenation
How do I copy cookies from Chrome?
Bash
Google Chrome
Cookies
Curl
Get UTC time in seconds
Bash
Date
Datetime
Why does /bin/sh behave differently to /bin/bash even if one points to the other?
Linux
Bash
Shell
Sh
shell-init: error retrieving current directory: getcwd -- The usual fixes do not wor
Linux
Bash
Shell
Ssh
Ansible
gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now
Linux
Bash
Gzip
Tar
'docker ps' output formatting: list only names of running containers
Bash
Docker
How can I redirect STDERR to STDOUT, but ignore the original STDOUT?
Bash
Redirect
Stdout
Find file in directory from command line
Bash
Shell
Autocomplete
Difference between wait and sleep
Bash
Shell
Wait
Sleep
How do I kill a backgrounded/detached ssh session?
Bash
Ssh
Background Process
Pid
How can the last command's wall time be put in the Bash prompt?
Bash
Time
Prompt
Bash script - store stderr in a variable
Bash
Scripting
Redirect
Stdout
Stderr
Linux: Find all symlinks of a given 'original' file? (reverse 'readlink')
Linux
Bash
Symlink
Reverse
Rename multiple files in shell
Bash
Shell
Extract string from brackets
Bash
Sed
Always include first line in grep
Bash
Grep
How to delete first two lines and last four lines from a text file with bash?
Linux
Bash
Retry a Bash command with timeout
Bash
Loops
Timeout
Bash scripting, multiple conditions in while loop
Bash
Shell
Loops
While Loop
Set a parent shell's variable from a subshell
Bash
Shell
Subshell
Convert line endings
Bash
Shell
Sed
Command Line
Dos2unix
subtract days from a date in bash
Linux
Bash
Shell
Bash: let statement vs assignment
Linux
Bash
Unix
Why exit code 141 with grep -q?
Linux
Bash
Freebsd
Append line to /etc/hosts file with shell script
Linux
Bash
Shell
Ubuntu
Sed
Pipes in a Git alias?
Git
Bash
Unix
Shell script - remove first and last quote (") from a variable
String
Bash
Shell
Unix
Sed
How to output a multiline string in Bash?
Bash
'\r': command not found - .bashrc / .bash_profile
Bash
Shell
Cygwin
Newline
Changing default shell in Linux
Linux
Bash
Shell
Environment
Tcsh
How to split a string in shell and get the last field
Bash
Split
Tokenize
Cut
How to remove last n characters from a string in Bash?
Bash
How to view files in binary from bash?
Bash
Shell
Binary
CMake is not able to find BOOST libraries
C++
Bash
Boost
Cmake
How do I change my $PS1 on a Macbook for oh-my-zsh?
Bash
Zsh
Zshrc
Oh My-Zsh
Jenkins: Pipeline sh bad substitution error
Bash
Jenkins
Groovy
Jenkins Pipeline
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" How does that work?
Linux
Bash
Shell
Unix
Scripting
Insert newline (\n) using sed
Bash
Sed
Freebsd
Bash: split long string argument to multiple lines?
Bash
Multiline
Easiest way to extract the urls from an html page using sed or awk only
Html
Regex
Bash
Sed
Awk
Linux / Bash, using ps -o to get process by specific name?
Linux
Bash
Process
Navigating to the earliest/latest command in history when you're in the middle of your history
Bash
Command Line
Command
Example of using named pipes in Linux shell (Bash)
Linux
Bash
Shell
Pipe
Named Pipes
shell replace cr\lf by comma
Bash
Shell
Newline
Text Processing
Why are scripting languages (e.g. Perl, Python, and Ruby) not suitable as shell languages?
Python
Ruby
Perl
Bash
Shell
Write to file, but overwrite it if it exists
Bash
Unix
Suppress warning messages using mysql from within Terminal, but password written in bash script
Mysql
Bash
Shell
How can I suppress all output from a command using Bash?
Bash
Shell
Scripting
Echo
How to convert timestamps to dates in Bash?
Bash
Date
Unix Timestamp
How to remove the last character from a bash grep output
Bash
Grep
How to avoid echo closing FIFO named pipes? - Funny behavior of Unix FIFOs
Bash
Unix
Pipe
Echo
self-deleting shell script
Bash
Shell
supervisord stopping child processes
Bash
Apache Zookeeper
Supervisord
Ubuntu 11.04
How to quickly find all git repos under a directory
Bash
Shell script common template
Bash
Shell
ZSH not recognizing my aliases?
Bash
Shell
Sh
Zsh
Zshrc
System.getenv() returns null when the environment variable exists
Java
Bash
Environment Variables
How can I suppress error messages of a command?
Linux
Bash
How to find files modified in last x minutes (find -mmin does not work as expected)
Linux
Bash
Unix
Gnu Findutils
How to loop through file names returned by find?
Bash
Find
Docker: How to use bash with an Alpine based docker image?
Bash
Docker
Dockerfile
Alpine
Getting ssh to execute a command in the background on target machine
Bash
Ssh
Csh
Matplotlib plots aren't shown when running file from bash terminal
Python
Bash
Matplotlib
Terminal
How to enable Bash in Windows 10 developer preview?
Linux
Windows
Bash
Windows 10
Windows Subsystem-for-Linux
What does the --ntasks or -n tasks does in SLURM?
Bash
Slurm
Windows 10 Bash (Ubuntu) - How to scroll up?
Bash
Windows 10
Windows Subsystem-for-Linux
Can you prevent a command from going into the bash shell command history?
Linux
Bash
Unix
Shell
How to get number of rows affected, while executing MySQL query from bash?
Mysql
Bash
What is the difference between operator "=" and "==" in Bash?
Bash
Operators
How to execute a .sql script from bash
Mysql
Database
Linux
Bash
The way to distinguish command-mode and insert-mode in Bash's Vi command line editing
Bash
Vi
Command Line-Interface
Add numbers to the beginning of every line in a file
Bash
Row Number
echo that outputs to stderr
Bash
Timeout a command in bash without unnecessary delay
Bash
Command Line
Timeout
Utilities
How to redirect both stdout and stderr to a file
Bash
Stdout
Io Redirection
Stderr
Unicode (utf-8) with git-bash
Windows
Bash
Unicode
Utf 8
Git Bash
Multi-dimensional arrays in Bash
Arrays
Bash
Shell
Multidimensional Array
grep from tar.gz without extracting [faster one]
Linux
Bash
Grep
read stdin in function in bash script
Bash
Shell
Pipe
Bash Function
Rename files and directories recursively under ubuntu /bash
Linux
Bash
Ubuntu
Find
Calling one Bash script from another Script passing it arguments with quotes and spaces
Bash
Shell
Double Quotes
Salt Stack
Syntax error near unexpected token 'fi'
Bash
How to write stdout to file with colors?
Linux
Bash
Terminal
Stdout
Always gives false even though file exists and is not empty
Bash
Windows 10 - Bash (Ubuntu) SU (Root Password)
Bash
Windows 10
Windows Subsystem-for-Linux
How to check if ssh-agent is already running in bash?
Linux
Bash
Shell
Ssh
How to zero pad numbers in file names in Bash?
Bash
Rename
Using if elif fi in shell scripts
Bash
Shell
wget: don't follow redirects
Linux
Http
Bash
Redirect
Wget
Read line by line in Bash script
Linux
Bash
Remove first directory components from path of file
Bash
Shell
Text Processing
Variables in bash seq replacement ({1..10})
Bash
Seq
virtualenvwrapper functions unavailable in shell scripts
Python
Bash
Virtualenv
Virtualenvwrapper
Run command every second in Bash?
Bash
Loops
Bash utility script library
Bash
Shell: redirect stdout to /dev/null and stderr to stdout
Linux
Bash
Shell
Sh
How do I find all of the symlinks in a directory tree?
Bash
Find
Symlink
How to use arguments from previous command?
Bash
Command Line
Keyboard Shortcuts
Input History
Bash convert epoch to date, showing wrong time
Bash
Date
Epoch
Using sed to split a string with a delimiter
Linux
Bash
Sed
String Split
How do I open a file with Chrome from the command line?
Bash
Google Chrome
Home/End keys do not work in tmux
Linux
Bash
Tmux
Redirecting output of bash for loop
Linux
Bash
Shell
Use awk to find average of a column
Bash
Awk
How to UNCOMMENT a line that contains a specific string using Sed?
Bash
Awk
Sed
How to read a .properties file which contains keys that have a period character using Shell script
Linux
Bash
Shell
Unix
How to trap ERR when using 'set -e' in Bash
Bash
Interrupt Handling
docker exec is not working in cron
Bash
Meteor
Docker
Cron
Meteor Up
Adding Git credentials on Windows
Git
Bash
Github
How to temporarily switch profiles for AWS CLI?
Bash
Shell
Amazon Web-Services
Command Line
Aws Cli
Control-r reverse-i-search in Bash: how do you "reset" the search in Cygwin?
Bash
Cygwin
Readline
Correct way to check for a command line flag in bash
Bash
Command Line
Flags
How to find the current git branch in detached HEAD state
Git
Bash
Jenkins
Branch
Travis Ci
Create new file from templates with bash script
Bash
Templates
Configuration
Template Engine
How to use the read command in Bash?
Bash
Built In
What is the difference between backticks and $() in a Bash script?
Bash
Backticks
How to fetch field from MySQL query result in bash
Mysql
Bash
How to get the PID of a process by giving the process name in Mac OS X ?
Macos
Bash
Shell
Process
Pid
Is there an easy way to pass a "raw" string to grep?
Bash
Escaping
Grep
Command Line-Interface
How to tee to stderr?
Bash
Stderr
Tee
find a pattern in files and rename them
Linux
Bash
Read Bash variables into a Python script
Python
Bash
Scripting
Environment Variables
Read JSON data in a shell script
Json
Bash
Shell
Test if a command outputs an empty string
Bash
Shell
count number of lines in terminal output
Bash
Terminal
Can bash show a function's definition?
Bash
Function
Recursively find all files that match a certain pattern
Macos
Bash
Command Line
brew install npm "npm: command not found"
node.js
Bash
Npm
Osx Elcapitan
MINGW64 "make build" error: "bash: make: command not found"
Bash
Go
Makefile
Mingw
Glide Golang
Python - Activate conda env through shell script
Python
Bash
Shell
Conda
How to run a bash script from C++ program
C++
Linux
Bash
Shell
Open a file at line with "filename:line" syntax
Bash
Emacs
Linux shell script to add leading zeros to file names
Linux
Bash
Shell
Grep
Why do you need ./ (dot-slash) before executable or script name to run it in bash?
Bash
Shell
Unix
Command Line
Fast way of finding lines in one file that are not in another?
Bash
Grep
Find
Diff
How to increment version number in a shell script?
Bash
Wine
Bash script store command output into variable
Bash
Variables
Store
Bash how do you capture stderr to a variable?
Bash
Stderr
Bash write to file without echo?
Bash
Command Line
Io Redirection
In Bash, how do I test if a variable is defined in "-u" mode
Bash
Use bash to find first folder name that contains a string
Bash
Shell
Find
Getting head to display all but the last line of a file: command substitution and standard I/O redirection
Bash
Unix
Pipe
shell variable in a grep regex
Bash
Grep
How to find files recursively by file type and copy them to a directory?
Linux
Bash
Centos
How to remove all non-numeric characters from a string in Bash?
Linux
Bash
Shell
Ubuntu
Terminal
Continue looping over submodules with the "git submodule foreach" command after a non-zero exit
Git
Bash
Git Submodules
Download file with url redirection
Bash
Url
Curl
Download
Wget
Store grep output in an array
Arrays
Bash
Shell
Can't load Python modules installed via pip from site-packages directory
Python
Macos
Bash
Module
Evernote
Bash print stderr only, not stdout
Linux
Bash
How to make the 'cut' command treat same sequental delimiters as one?
Bash
Unix
Delimiter
Cut
Running script upon login in mac OS X
Bash
Shell
Automation
Osx Snow-Leopard
How to get osx shell script to show colors in echo
Macos
Bash
Shell
Echo
Getting an error cp: cannot stat when trying to copy files from one folder to another
Bash
Unix
Command Line
Cp
Mv
Sed gives: sed: can't read : No such file or directory
Bash
Sed
Quoting
Gnu Sed
How to install Certbot (Let's Encrypt) without interaction?
Bash
Ssl
Server
Lets Encrypt
Certbot
Set screen-title from shellscript
Bash
Title
Gnu Screen
Xterm
Bash variable assignment and command not found
Bash
Shell
Variables
Cygwin
Bash script to check running process
Bash
Shell script to count files, then remove oldest files
Linux
Bash
Shell
Find the files that have been changed in last 24 hours
Linux
Bash
Find
How to get the first line of a file in a bash script?
Bash
How to loop over files in natural order in Bash?
Bash
Natural Sort
rm: cannot remove: Permission denied
Linux
Bash
Read n lines at a time using Bash
Bash
Grep output with multiple Colors?
Bash
Colors
Sed
Awk
Grep
Unset an environment variable for a single command
Bash
Unix
Environment Variables
Assigning the output of a command to a variable
Bash
Unix
Sh
Show sha1 only with git log
Git
Bash
Shell script: Run function from script over ssh
Linux
Bash
Shell
Sh
How to make case statement match a number range?
Bash
Switch Statement
How can I check if 'grep' doesn't have any output?
Bash
If Statement
Null
Grep
How to execute a bash command stored as a string with quotes and asterisk
Bash
Scripting
Escaping
Quotes
Iterating through JSON array in Shell script
Json
Bash
Jq
How can I loop over the output of a shell command?
Linux
Bash
Shell
Shell script to open a URL
Bash
Shell
How to use multiline command in 'script:' with YAML?
Bash
Continuous Integration
Yaml
Travis Ci
virtualenv name not show in zsh prompt
Bash
Zsh
Oh My-Zsh
Escaping forward slashes in sed command
Bash
Shell
Sed
Run a shell script and immediately background it, however keep the ability to inspect its output
Bash
Background Process
Daemon
Gnu Screen
Job Control
Detect if PATH has a specific directory entry in it
Bash
Shell
Path
source all files in a directory from .bash_profile
Bash
Shell
Scripting
GZip every file separately
Linux
Bash
Gzip
Get ceiling integer from number in linux (BASH)
Linux
Bash
Shell
Ceil
Automatic tagging of releases
Git
Bash
Hudson
How to use `while read` (Bash) to read the last line in a file if there’s no newline at the end of the file?
Bash
Newline
Eof
How to get the start time of a long-running Linux process?
Linux
Bash
Process
Select random lines from a file
Bash
Shell
Random
Text Processing
Open and write data to text file using Bash?
Bash
Shell
How to create a CPU spike with a bash command
Linux
Bash
Load
Cpu
Reading null delimited strings through a Bash loop
Bash
Delimiter
Null Character
What is the meaning of a question mark in bash variable parameter expansion as in ${var?}?
Bash
Variables
Syntax
Expression after last specific character
Linux
Bash
Shell
Unix
Scripting
Rename Directory Name Before tar Happens
Bash
Shell
Command Line
Tar
Problems using subl command in terminal: "Command not found" & "No such file or directory"
Bash
Terminal
Sublimetext2
How to change values of bash array elements without loop
Arrays
Bash
Use wc on all subdirectories to count the sum of lines
Linux
Bash
Text Files
Console Application
Capture both stdout and stderr in Bash
Bash
Stream
Pipe
Stdout
Stderr
Simulate user input in bash script
Bash
Input
Emulation
User Input
ssh script returns 255 error
Linux
Bash
Shell
Ssh
Running several scripts in parallel bash script
Bash
Parallel Processing
SED without backup file
Macos
Bash
Sed
Osx Mavericks
Differences between MSYS2 and Cygwin
Bash
Cygwin
Msys2