because py3k nor js can output fixed floats with full precision
[shellsnippets/shellsnippets.git] / mksh / bmgrep
1 #!/bin/mksh
2 set -A args
3 blub=0
4 for x in "$@"; do
5         case $blub:$x {
6         (0:--)
7                 blub=1
8                 ;;
9         (0:-*)
10                 args[${#args[*]}]=$x
11                 ;;
12         (*)
13                 args[${#args[*]}]=-e
14                 args[${#args[*]}]=$x
15                 ;;
16         }
17 done
18 wc -l ~/.etc/*.htm
19 print -ru2 -- + fgrep "${args[@]}"
20 exec fgrep -n "${args[@]}" -- ~/.etc/*.htm