Display a line of text
-n
don't new line
-e
enable escape character
echo "Hello World"
echo -n "Hello World
echo -e "\033[0;31m Hello World
Print name of shell current/working directory
pwd
Change shell current/working directory
~ change to home directory
- change to previous working directory
.. change to parent directory
cd
cd ~
cd -
cd ..
cd /root
Display information about command type
type pwd
Result
pwd is a shell builtin
One line is read from the standard input, or from the file descriptor
Args | Description |
---|---|
-s | Silent mode, characters are not echoed. |
-p | Prompt output the string PROMPT without a trailing newline before attempting to read |
-u fd | Read input from file descriptor fd |
-n nchars | Read returns after reading [nchars] characters rather than waiting for a complete line of input |
read -s -p "Password :" pass
- alias
- bg
- bind
- break
- builtin
- caller
- cd
- command
- compgen
- complete
- compopt
- continue
- declare
- dirs
- disown
- echo
- enable
- eval
- exec
- exit
- export
- fc
- fg
- hash
- help
- history
- jobs
- kill
- let
- local
- logout
- mapfile
- popd
- printf
- pushd
- pwd
- read
- readarray
- readonly
- return
- set
- shift
- shopt
- source
- test
- times
- trap
- type
- typeset
- ulimit
- umask
- unalias
- unset
- wait