blueswir1 | 5824d65 | 2009-03-28 06:44:27 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | hxtoh() |
| 4 | { |
| 5 | flag=1 |
blueswir1 | fb21ced | 2009-03-29 09:06:43 +0000 | [diff] [blame] | 6 | while read -r str; do |
blueswir1 | 5824d65 | 2009-03-28 06:44:27 +0000 | [diff] [blame] | 7 | case $str in |
| 8 | HXCOMM*) |
| 9 | ;; |
Peter Maydell | 3885e2c | 2020-03-06 17:17:45 +0000 | [diff] [blame] | 10 | SRST*|ERST*) flag=$(($flag^1)) |
blueswir1 | 5824d65 | 2009-03-28 06:44:27 +0000 | [diff] [blame] | 11 | ;; |
| 12 | *) |
blueswir1 | 004efc9 | 2009-03-29 10:50:43 +0000 | [diff] [blame] | 13 | test $flag -eq 1 && printf "%s\n" "$str" |
blueswir1 | 5824d65 | 2009-03-28 06:44:27 +0000 | [diff] [blame] | 14 | ;; |
| 15 | esac |
| 16 | done |
| 17 | } |
| 18 | |
blueswir1 | 5824d65 | 2009-03-28 06:44:27 +0000 | [diff] [blame] | 19 | case "$1" in |
| 20 | "-h") hxtoh ;; |
blueswir1 | 5824d65 | 2009-03-28 06:44:27 +0000 | [diff] [blame] | 21 | *) exit 1 ;; |
Marc-André Lureau | 3f88565 | 2019-07-15 18:06:04 +0400 | [diff] [blame] | 22 | esac < "$2" |
blueswir1 | 5c2f8d2 | 2009-03-28 08:13:56 +0000 | [diff] [blame] | 23 | |
| 24 | exit 0 |