giovedì 17 maggio 2012

Ksh script to remove shared memory

Today a simple script to remove shared memory in ksh :


#!/bin/ksh


#
# Shell Script to remove shared memory MVNO Instance
#


PID=$(ipcs -m | grep 0x000000a[0-9a-b] | awk '{print $2}'|xargs)
for one_pid in ${PID}; do
    ipcrm -m ${one_pid}
    echo 'Removed shm : ' ${one_pid}
done

This script remove all shared memory from address 0x000000a0 to 0x000000ab. You must modify this expression to remove another shared memory.

Stay tuned.


Nessun commento:

Posta un commento

Check Mid Year Objectives

Hi all Today middle year check of my 2026's goals. 1. ENGLISH Improve listening comprehension (So and So)   See at least one or two film...