1
1
mirror of https://github.com/namibia/awesome-cheatsheets.git synced 2024-11-21 20:35:12 +00:00

Merge pull request #253 from rparwaiz/patch-3

Update bash.sh
This commit is contained in:
Julien Le Coupanec 2021-12-18 17:00:02 +01:00 committed by GitHub
commit 92c29be4bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -207,6 +207,10 @@ read -p "prompt" <varname> # same as above but outputs a prompt to ask user fo
column -t <filename> # display info in pretty columns (often used with pipe)
let <varname> = <equation> # performs mathematical calculation using operators like +, -, *, /, %
export VARNAME=value # defines an environment variable (will be available in subprocesses)
export -f <funcname> # Exports function 'funcname'
export var1="var1 value" # Export and assign in the same statement
export <varname> # Copy Bash variable
declare -x <varname> # Copy Bash variable
array[0]=valA # how to define an array
array[1]=valB