Thanks for your response, I could able to solve it as follows. Hope it may be
helpful to others as well
#!/bin/ksh
PID=$(ipcs -m |grep "subh" |awk '{print $2}'|xargs)
for one_pid in ${PID}; do
ipcrm -m ${one_pid}
done
On Mon, 01 Sep 2008 Sk karthik wrote :
>Try
>
>ipcrm -m $( ipcs -m | cut -d ' ' -f 5 | grep "^[1-9]" )
>
>SK Karthik
>
>On 8/28/08, kumars <[EMAIL PROTECTED]> wrote:
> >
> >
> > Can any one tell me how to....
> >
> > I am trying to search and delete shared memory id on the AIX by using
> > following command
> >
> > searching the shared memory id is working fine
> >
> > ipcs -m | cut -d ' ' -f 5 | grep "^[1-9]" (this command displays all the
> > shmid)
> >
> > But when I am trying to delete as follows, couldn't able to get through
> > it....
> >
> > ipcrm -m | ipcs -m | cut -d ' ' -f 5 | grep "^[1-9]"
> >
> > We can delete the shmid by using " ipcrm -m shmid" one by one but how do we
> > delete all shmid in one sort...
> > --
> > View this message in context:
> > http://www.nabble.com/ipcrm-command-tp19087813p19087813.html
> > Sent from the C-prog mailing list archive at Nabble.com.
> >
> >
> >
>
>
>[Non-text portions of this message have been removed]
>
skumar
[Non-text portions of this message have been removed]