summaryrefslogtreecommitdiff
path: root/qa/xlate_2_new_pmns
blob: faae4cf5115bf573ae8a820c71aceb951409687e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#! /bin/sh
#
# translate to the new pmns names (drop irix. prefix etc)
#
# Usage: xlate_2_new_pmns [file ...]
#
# Copyright (c) 1997-2002 Silicon Graphics, Inc.  All Rights Reserved.
#

_map()
{
    sed \
	-e 's/^/ /' \
	-e 's/\([^a-zA-Z0-9_.]\)irix\.numa/\1origin.numa/g' \
	-e 's/\([^a-zA-Z0-9_.]\)irix\.node/\1origin.node/g' \
	-e 's/\([^a-zA-Z0-9_.]\)irix\./\1/g' \
	-e 's/\([^a-zA-Z0-9_.]\)resource\.name_cache/\1name_cache/g' \
	-e 's/\([^a-zA-Z0-9_.]\)resource\.buffer_cache/\1buffer_cache/g' \
	-e 's/\([^a-zA-Z0-9_.]\)resource\.vnodes/\1vnodes/g' \
	-e 's/\([^a-zA-Z0-9_.]\)resource\.efs/\1efs/g' \
	-e 's/^ //'
}

if [ $# -eq 0 ]
then
    _map
else
    tmp=/var/tmp/$$
    trap "rm -f $tmp; exit 0" 0 1 2 3 15
    for file
    do
	_map <$file >$tmp
	cp $tmp $file
    done
fi