You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cmd >file 2>&1##first redirect stderr to stdout , then redirect stdout to file ``
vim replace
:%s/origin_pattern/new_string/cig
kill multi process with one line
kill$(ps aux | grep '[p]ython csp_build.py'| awk '{print $2}')
Details on its workings are as follows:
first try kill -15 $(....) if not help try kill -9
The ps gives you the list of all the processes.
The grep filters that based on your search string, [p] is a trick to stop you picking up the actual grep process itself.
The awk just gives you the second field of each line, which is the PID.
The $(x) construct means to execute x then take its output and put it on the command line. The output of that ps pipeline inside that construct above is the list of process IDs so you end up with a command like kill 1234 1122 7654.
The text was updated successfully, but these errors were encountered: