删除消息队列的shel

   
ipcs -q | awk 'NR > 3 {print "ipcrm -q", $2}' | sh



#!/bin/sh
for i in `ipcs -q |awk '$1~/^q/ {print $2}'`
do
  ipcrm -q $i
done