ipcs -q|awk '{print $2}'|xargs -n1 ipcrm -q 注意xargs一定要加-n1参数,不然一次只清掉一行 转载于:https://www.cnblogs.com/seawwh/archive/2011/11/01/2231188.html