日期:2014-05-16 浏览次数:20727 次
IFS=""
while read key shmid owner perms bytes nattch
do
echo "$key $shmid $perms $nattch"
#echo 123
ipcrm -m $sh
done </tmp/shm.tmp
IFS=" " # <- 引号里是空格
while read key shmid owner perms bytes nattch
do
echo "key: $key shmid: $shmid perms: $perms nattch: $nattch"
#echo 123
# ipcrm -m $sh <- 你这个 sh 变量不存在嘛
done </tmp/shm.tmp