Skip to content

Latest commit

 

History

History
35 lines (28 loc) · 784 Bytes

File metadata and controls

35 lines (28 loc) · 784 Bytes

Quoting

ECHO VS PRINTF --- HOME --- USER INPUT

Double Quote (")

Useful when we want variable and command substitution.

echo "$SHELL"
-> /bin/bash

Single Quote (')

Turns off special meaning of all character, be it command or variable. Everything will be printed as displayed.

echo '$SHELL'
-> $SHELL

Backslash (\)

Removes special meaning of characters in double quotes.

echo "\$SHELL = $SHELL"
-> $SHELL = /bin/bash

Unsetting Variables

  • unset command is ised to delete variable during program execution.
  • unset can be used both with variables as well as functions.

The syntax for unset is :

unset variableName

Readonly variables can't be unset.