Shell cmd set note

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

Shell cmd set note的相关文章

Jenkins添加构建后shell cmd的应用插件

详情见:http://stackoverflow.com/questions/11160363/execute-shell-script-after-post-build-in-jenkins 在Linux服务器上,当构建完毕之后需要对构建对内容,文件进行操作,如果能够使用shell命令执行是非常方便的, 然而Jenkins默认只能构建前执行shell,不能构建后执行shell.当有该需求时Jenkins的 PostBuildScript plugin插件 能够帮助我们实现这个功能. 怎么安装J

linux shell 快速入门小例子(shell十三问学习NOTE)

读CU论坛shell十三问后进行的几次小实验,备忘一下! SHELL十三问地址:http://bbs.chinaunix.net/thread-218853-1-1.html #!/bin/bash function func_com() { local a=1 local b="2c3" echo ${a}b echo $ab } function func_array() { echo "##### func_array #####" local PATH=&q

shell cmd args

The * and ? will be extended to filename only  outside of single quotation and double quotation noticely, the . will not be extended in shell wildcard match system $@  all command line arguements $* all command line arguements 原文地址:https://www.cnblog

java执行shell/cmd命令

try { Process p =Runtime.getRuntime().exec("chmod 777 /home/bomb/MoveToy/WebRoot/a.sh " ); p.waitFor(); Process pro = Runtime.getRuntime().exec(" /home/bomb/MoveToy/WebRoot/./a.sh " + num); pro.waitFor(); System.out.println("run&q

Android Shell Cmd

1.view android version grep ro.build.version.sdk= system/build.prop getprop ro.build.version.release 2.alsa driver version cat /proc/asound/version

Shell Cmd

Last login: Wed Apr 10 08:58:20 on ttys001 winds-Mac-mini:~ wind$ cd /Users/wind/Desktop/LED/10\ AppStore/LED-Viewer_20190409_V1.5.1 winds-Mac-mini:LED-Viewer_20190409_V1.5.1 wind$ pod install Analyzing dependencies Downloading dependencies Using AFN

计算机概念-shell

shell 与windows下的cmd区别   http://segmentfault.com/q/1010000000316935 首先说shell,shell直接翻译就是壳,按照ABS的定义,shell是The shell is a command interpreter. More than just the insulating layer between the operating system kernel and the user, it's also a fairly power

执行 CMD 时,参数加引号常见问题

在调用 CMD 时,如脚本中用 WScript.Shell 调用. 如果参数中有包含空格的长路径名时,必须要加引号才能正确被识别. 是的,大家都知道要加引号,但怎么加却容易被误解.这个问题,不时地会遇上,上次弄清楚了,但隔一段时间,还是忘了,同样的问题又要重新摸索,非常痛苦. 如: Set objShell = WScript.CreateObject("WScript.Shell") cmd = "cmd.exe /C ""C:\Program File

Powerful Bash-style command line editing for cmd.exe

https://mridgers.github.io/clink/ Clink Download v0.4.8 ZIP (portable) EXE (installer) Overview Clink combines the native Windows shell cmd.exe with the powerful command line editing features of the GNU Readline library, which provides rich completio