But user fast switch is enabled. I logged in as administrator and used terminal to kill other's Dock process.
PS=`ps aux | awk '{if($1="amanyus") print}' | grep -i dock`; kill $PS
PS is temporary shell variable to hold a value. This value is coming from a ps command after few filtering with awk and grep. Awk only print lines that match the first column with user amanyus, which result in all amanyus' processes. Next with grep, only match insensitive case dock rather that all processes under user amanyus because we only want to find Dock process and put in the PS variable. Up to this point, PS variable will hold the process number of amanyus' Dock. After the semicolon, the process will be killed.
Silly is you just can simply use
ps aux | grep amanyus | grep Dock
and kill the Dock's process without bothering with awk command =pp/s: Hey, I forgot about spotlight at the first time to search Terminal, but not sure if it would work.
No comments:
Post a Comment