1
1
mirror of https://github.com/namibia/awesome-cheatsheets.git synced 2024-11-23 21:27:40 +00:00

Update bash.sh

This commit is contained in:
rparwaiz 2021-12-02 11:08:52 +00:00 committed by GitHub
parent cc3cb1bc11
commit 7c9ebfc0be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -206,6 +206,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