Top "Bash" questions

For questions about scripts written for the Bash command shell.

Defining a variable with or without export

What is export for? What is the difference between: export name=value and name=value

linux bash shell
How to split a string in shell and get the last field

Suppose I have the string 1:2:3:4:5 and I want to get its last field (5 in this case). How do I do …

bash split tokenize cut
How to gzip all files in all sub-directories into one compressed file in bash

Possible Duplicate: gzipping up a set of directories and creating a tar compressed file This post describes how to gzip …

linux bash shell gzip
How do I execute a bash script in Terminal?

I have a bash script like: #!/bin/bash echo Hello world! How do I execute this in Terminal?

bash terminal
How to get the process ID to kill a nohup process?

I'm running a nohup process on the server. When I try to kill it my putty console closes instead. this …

linux bash grep nohup
Is there a "goto" statement in bash?

Is there a "goto" statement in bash ? I know It is considered bad practice, but I need specifically "goto".

linux bash shell goto
How to urlencode data for curl command?

I am trying to write a bash script for testing that takes a parameter and sends it through curl to …

bash shell curl scripting urlencode
Checking Bash exit status of several commands efficiently

Is there something similar to pipefail for multiple commands, like a 'try' statement but within bash. I would like to …

bash exit
What is the cleanest way to ssh and run multiple commands in Bash?

I already have an ssh agent set up, and I can run commands on an external server in Bash script …

bash unix ssh