shell习题-杀死进程


把当前用户下所有进程名字中含有”aming”的进程关闭。

参考答案:

#!/bin/bash

ps -u $USER |awk '$NF ~ /aming/ {print $1}'|xargs kill