Thanks, case insensitive grep would have helped ... Can you please change the ipcrm command not to run as root (e.g. with runuser)? Then this would be fine.