根据输入杀掉进程
ps -efww | grep $1 | grep -v grep | cut -c 9-15 | xargs kill -9
根据名称寻找进行对应的可执行文件
#!/bin/bash
for pid in `ps -e | grep $1 | awk '{print $1}'` ;
do
echo -n "${pid} "
ls -l /proc/${pid}/exe | awk '{print $11}'
done
批量裁剪图片
#!/bin/sh
for img in `ls | grep png | grep -v crop`
do
echo $img
convert $img -crop 56x852+525+0 +repage -scale 100% ${img}_crop.png
convert ${img}_crop.png -transparent "rgb(82,87,110)" ${img}_crop.png
done