TOP Computer Languages
man
TOC
* | ($*) is equivalent to "$1c$2c…", where c is the first character of the value of the IFS variable | |
@ | ($@) is equivalent to "$1" "$2" | |
# | ($#) is the number of positional parameters in decimal | |
? | ($?) Expands to the exit status of the most recently executed foreground pipeline. | |
- | ($-) Expands to the current option flags | |
$ | ($$) is the process ID of the shell | |
($!) is the process ID of the job most recently placed into the background | ||
0 | ($0) is the name of the shell or shell script | |
_ | ($_) is the same as $0 in script, or the arguments of the last command. | |
int | $1,$2,... are the Positional Parameters |
man
Parameter and Variable Index
TOC
Parameter and Variable Index
CDPATH | ||
HOME | ||
IFS | separator characters | |
MAILPATH | ||
OPTARG | ||
OPTIND | ||
PATH | ||
PS1 | primary prompt string | '\s-\v\$ ' |
PS2 | secondary prompt string | ‘> ’ |
man
Parameter and Variable Index
TOC
Parameter and Variable Index
BASH | The full pathname Bash | |
BASHOPTS | list of shell options | colon-separated |
BASHPID | pid | assoc.arr |
BASH_ALIASES | aliases | |
BASH_ARGC | argc | arr |
BASH_ARGV | argv | arr |
BASH_CMDS | command | assoc.arr |
BASH_COMMAND | current command | |
BASH_COMPAT | compatibility level | |
BASH_ENV | env | |
BASH_EXECUTION_STRING | arg to -c | |
BASH_LINENO | line no. | arr |
BASH_REMATCH | rematch | arr,ro |
BASH_SOURCE | src fname | arr |
BASH_SUBSHELL | subshell | int |
BASH_VERSINFO | version | arr,ro |
BASH_VERSINFO[0] | major versoin number | release |
BASH_VERSINFO[1] | minor version number | version |
BASH_VERSINFO[2] | pathc level | |
BASH_VERSINFO[3] | build | |
BASH_VERSINFO[4] | release status | (e.g., beta1) |
BASH_VERSINFO[5] | value of MACHTYPE | |
BASH_VERSION | version number of current Bash | |
BASH_XTRACEFD | -x trace file desc. | |
CHILD_MAX | ||
COLUMNS | ||
COMP_CWORD | ||
COMP_LINE | ||
COMP_POINT | ||
COMP_TYPE | ||
COMP_KEY | ||
COMP_WORDBREAKS | ||
COMP_WORDS | ||
COMPREPLY | ||
COPROC | ||
DIRSTACK | ||
EMACS | ||
ENV | ||
EUID | ||
FCEDIT | ||
FIGNORE | ||
FUNCNAME | ||
FUNCNEST | ||
GLOBIGNORE | ||
GROUPS | ||
histchars | ||
HISTCMD | ||
HISTCONTROL | ||
HISTFILE | ||
HISTFILESIZE | ||
HISTIGNORE | ||
HISTSIZE | ||
HISTTIMEFORMAT | ||
HOSTFILE | ||
HOSTNAME | ||
HOSTTYPE | ||
IGNOREEOF | ||
INPUTRC | ||
LANG | locale | |
LC_ALL | override LANG,LC_ | |
LC_COLLATE | ||
LC_CTYPE | ||
LC_MESSAGES | ||
LC_NUMERIC | ||
LINENO | ||
LINES | ||
MACHTYPE | ||
MAILCHECK | ||
MAPFILE | ||
OLDPWD | ||
OPTERR | ||
OSTYPE | ||
PIPESTATUS | ||
POSIXLY_CORRECT | ||
PPID | ||
PROMPT_COMMAND | ||
PROMPT_DIRTRIM | ||
PS3 | ||
PS4 | ||
PWD | ||
RANDOM | ||
READLINE_LINE | ||
READLINE_POINT | ||
REPLY | ||
SECONDS | ||
SHELL | ||
SHELLOPTS | ||
SHLVL | ||
TIMEFORMAT | ||
TMOUT | ||
TMPDIR | ||
UID |
ARG_MAX:Maximum length of argument to the exec functions
$ getconf ARG_MAX 2097152
PS1
#!/bin/bash
# bash text color samples
#ESCAPE \e color
echo $'\e[0m \\e[0;30m \e[0;30m black'
echo $'\e[0m \\e[0;31m \e[0;31m red'
echo $'\e[0m \\e[0;32m \e[0;32m green'
echo $'\e[0m \\e[0;33m \e[0;33m yellow'
echo $'\e[0m \\e[0;34m \e[0;34m blue'
echo $'\e[0m \\e[0;35m \e[0;35m magenta'
echo $'\e[0m \\e[0;36m \e[0;36m cyan'
echo $'\e[0m \\e[0;37m \e[0;37m light gray'
echo $'\e[0m \\e[1;30m \e[1;30m dark gray'
echo $'\e[0m \\e[1;31m \e[1;31m red'
echo $'\e[0m \\e[1;32m \e[1;32m green'
echo $'\e[0m \\e[1;33m \e[1;33m yellow'
echo $'\e[0m \\e[1;34m \e[1;34m blue'
echo $'\e[0m \\e[1;35m \e[1;35m magenta'
echo $'\e[0m \\e[1;36m \e[1;36m cyan'
echo $'\e[0m \\e[1;37m \e[1;37m white'
echo $'\e[0m \\e[0;40m \e[0;40m black'
echo $'\e[0m \\e[0;41m \e[0;41m red'
echo $'\e[0m \\e[0;42m \e[0;42m green'
echo $'\e[0m \\e[0;43m \e[0;43m yellow'
echo $'\e[0m \\e[0;44m \e[0;44m blue'
echo $'\e[0m \\e[0;45m \e[0;45m magenta'
echo $'\e[0m \\e[0;46m \e[0;46m cyan'
echo $'\e[0m \\e[0;47m \e[0;47m light gray'
echo $'\e[0m \\e[1;40m \e[1;40m dark gray'
echo $'\e[0m \\e[1;41m \e[1;41m red'
echo $'\e[0m \\e[1;42m \e[1;42m green'
echo $'\e[0m \\e[1;43m \e[1;43m yellow'
echo $'\e[0m \\e[1;44m \e[1;44m blue'
echo $'\e[0m \\e[1;45m \e[1;45m magenta'
echo $'\e[0m \\e[1;46m \e[1;46m cyan'
echo $'\e[0m \\e[1;47m \e[1;47m white'
echo $'\e[0m \\e[1:31m \\e[1;47m \e[0;31m \e[1;47m red on white'
echo $'\e[0m \\ep0m \e[0m reset'
TOC
#!/bin/bash
# bash text color samples
#ESCAPE \e color
echo $'\e[0m \\e[0;30m \e[0;30m black'
echo $'\e[0m \\e[0;31m \e[0;31m red'
echo $'\e[0m \\e[0;32m \e[0;32m green'
echo $'\e[0m \\e[0;33m \e[0;33m yellow'
echo $'\e[0m \\e[0;34m \e[0;34m blue'
echo $'\e[0m \\e[0;35m \e[0;35m magenta'
echo $'\e[0m \\e[0;36m \e[0;36m cyan'
echo $'\e[0m \\e[0;37m \e[0;37m light gray'
echo $'\e[0m \\e[1;30m \e[1;30m dark gray'
echo $'\e[0m \\e[1;31m \e[1;31m red'
echo $'\e[0m \\e[1;32m \e[1;32m green'
echo $'\e[0m \\e[1;33m \e[1;33m yellow'
echo $'\e[0m \\e[1;34m \e[1;34m blue'
echo $'\e[0m \\e[1;35m \e[1;35m magenta'
echo $'\e[0m \\e[1;36m \e[1;36m cyan'
echo $'\e[0m \\e[1;37m \e[1;37m white'
echo $'\e[0m \\e[0;40m \e[0;40m black'
echo $'\e[0m \\e[0;41m \e[0;41m red'
echo $'\e[0m \\e[0;42m \e[0;42m green'
echo $'\e[0m \\e[0;43m \e[0;43m yellow'
echo $'\e[0m \\e[0;44m \e[0;44m blue'
echo $'\e[0m \\e[0;45m \e[0;45m magenta'
echo $'\e[0m \\e[0;46m \e[0;46m cyan'
echo $'\e[0m \\e[0;47m \e[0;47m light gray'
echo $'\e[0m \\e[1;40m \e[1;40m dark gray'
echo $'\e[0m \\e[1;41m \e[1;41m red'
echo $'\e[0m \\e[1;42m \e[1;42m green'
echo $'\e[0m \\e[1;43m \e[1;43m yellow'
echo $'\e[0m \\e[1;44m \e[1;44m blue'
echo $'\e[0m \\e[1;45m \e[1;45m magenta'
echo $'\e[0m \\e[1;46m \e[1;46m cyan'
echo $'\e[0m \\e[1;47m \e[1;47m white'
echo $'\e[0m \\e[1:31m \\e[1;47m \e[0;31m \e[1;47m red on white'
echo $'\e[0m \\ep0m \e[0m reset'
TOC
#! /bin/bash
TOC
TOC
最新コメント