--- ./bin/autodel.orig	Mon Jan  1 14:51:46 2007
+++ ./bin/autodel	Tue Jan  2 13:40:34 2007
@@ -18,17 +18,17 @@
 OWNER=`echo ${1:-$USER} | cut -c 1-8`
 
 # Parse the output of ipcs for the IDs of the resources we want
-SEM_IDS=`ipcs -s -c | grep "$OWNER" | cut -d\  -f 1`
+SEM_IDS=`ipcs -s -c | grep "$OWNER" | awk '{print $2}'`
 
 for ID in $SEM_IDS
 do
-        ipcrm sem $ID > /dev/null
+        ipcrm -s $ID > /dev/null
 done
 
 # Parse the output of ipcs for the IDs of the resources we want
-SHM_IDS=`ipcs -m -c | grep "$OWNER" | cut -d\  -f 1`
+SHM_IDS=`ipcs -m -c | grep "$OWNER" | awk '{print $2}'`
 
 for ID in $SHM_IDS
 do
-        ipcrm shm $ID > /dev/null
+        ipcrm -m $ID > /dev/null
 done
