aboutsummaryrefslogtreecommitdiff
path: root/scripts/hxtool
blob: 7b1452f3cf1588cc8fd4053f53dc733adb99b52b (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
#!/bin/sh

hxtoh()
{
    flag=1
    while read -r str; do
        case $str in
            HXCOMM*)
            ;;
            SRST*|ERST*) flag=$(($flag^1))
            ;;
            *)
            test $flag -eq 1 && printf "%s\n" "$str"
            ;;
        esac
    done
}

case "$1" in
"-h") hxtoh ;;
*) exit 1 ;;
esac

exit 0