1 2 3 4 5
#!/bin/sh ipcrm `ipcs -m | grep $USER | awk '{print "-m "$2}'` ipcrm `ipcs -s | grep $USER | awk '{print "-s "$2}'`