1,expr
a)expr calculate//a=10;echo `expr $a - 1 `
b)string index //a=‘abcde‘;echo `expr index $a "b"`|| string substr// a=‘abcde‘; echo `expr substr $a 2 3`
c)regrexp// a=
2,echo
a)string len//echo ${#a} ||string index//echo ${a:1:4}
centOs install emacs-nox :yum -y install emacs-nox
3,ps -ef | grep docker | grep -v "color=auto" | awk -F " " ‘{print $2}‘ | xargs kill -9 //stop all docker process
4,awk
[email protected]:~> yes | head -5 | awk ‘{printf("user_%d 12345 user_%[email protected]\n",NR,NR)}‘
user_1 12345 [email protected]
...
5,ps axw -o pid,ppid,user,%cpu,vsz,wchan,command | egrep ‘(nginx|PID)‘
时间: 2024-11-03 21:09:01