shell1
Posted zhg1016
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了shell1相关的知识,希望对你有一定的参考价值。
1.echo $PATH
export PATH="$PATH:/home/user/bin"
PREPEND
prepend() { [ -d "$2" ] && eval $1="$2‘:‘$$1" && export $1; }
2.echo -e "e[1;31m This is red text e[0m"
0 black 30 red 31 green 32 yellow 33 bule 34 yangred 35 qing 36 white 37
backgroud color 0 black 40 red 41 green 42 y 43 bule 44 yangred 45 qing 46 white 47
3.env
cat /proc/$PID/environ
pgrep gedit -> serch process ID
4.let (()) [ ] bc
echo "scale=2;22/7" | bc
5.$?
echo $?
6. command | tee FILE1 FILE2 | otherCommand
cat a* | tee -a out.txt | cat -n # -a add
7.declare -A ass_array
8.alias rm=‘cp [email protected] ~/backup && rm [email protected]‘
unalias
command
以上是关于shell1的主要内容,如果未能解决你的问题,请参考以下文章