blob: 80516b9437506c6ee091956d6044fcab16146d58 [file] [log] [blame]
blueswir15824d652009-03-28 06:44:27 +00001#!/bin/sh
2
3hxtoh()
4{
5 flag=1
blueswir1fb21ced2009-03-29 09:06:43 +00006 while read -r str; do
blueswir15824d652009-03-28 06:44:27 +00007 case $str in
8 HXCOMM*)
9 ;;
Peter Maydell3885e2c2020-03-06 17:17:45 +000010 SRST*|ERST*) flag=$(($flag^1))
blueswir15824d652009-03-28 06:44:27 +000011 ;;
12 *)
blueswir1004efc92009-03-29 10:50:43 +000013 test $flag -eq 1 && printf "%s\n" "$str"
blueswir15824d652009-03-28 06:44:27 +000014 ;;
15 esac
16 done
17}
18
blueswir15824d652009-03-28 06:44:27 +000019case "$1" in
20"-h") hxtoh ;;
blueswir15824d652009-03-28 06:44:27 +000021*) exit 1 ;;
Marc-André Lureau3f885652019-07-15 18:06:04 +040022esac < "$2"
blueswir15c2f8d22009-03-28 08:13:56 +000023
24exit 0