source: trunk/IPs/systemC/processor/Morpheo/Script/param_del.sh

Last change on this file was 146, checked in by rosiere, 14 years ago

1) Integration of RegisterFile_Internal_Banked in RegisterFile?
2) Erase "read_write" interface in RegisterFile_Monolithic component
3) Add smith predictor parameters in Load_store_pointer_unit.
4) Fix not statistics flags

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 1.0 KB
Line 
1#!/bin/bash
2
3function usage ()
4{
5    echo "${0} params";
6    echo "erase line with params";
7    exit 1;
8}
9
10function del_param ()
11{
12    local file=${1};
13    shift;
14    local -a params=(${*});
15
16    # no separator
17    SAVEIFS=${IFS};
18    IFS="";
19
20    while read line; do
21
22        local find=0;
23
24        for param in ${params[*]}; do 
25            local count=$(echo  "${line}"| grep -c ${param});
26
27            if test ${count} -ne 0; then
28                find=1;
29                break;
30            fi;
31        done;
32
33        if test ${find} -eq 0; then
34            echo "${line}";
35        fi;
36
37    done < ${file};
38
39    IFS=${SAVEIFS};
40}
41
42function del_file ()
43{
44    local file=${1};
45
46    echo "  * ${file}";
47    del_param ${*} > tmp;
48    mv tmp ${file};
49}
50
51function del_files ()
52{
53    for file in *.cfg; do 
54        del_file ${file} ${*};
55    done 
56}
57
58function main ()
59{
60    if test ${#} -eq 0; then
61        usage ${*};
62    fi;
63   
64    echo "delete parameters : ${*}";
65
66#   del_param debug.cfg ${*};
67    del_files ${1};
68}
69
70main ${*};
71#del_param debug.cfg ;
72
Note: See TracBrowser for help on using the repository browser.