Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
15 | PointedEar | 1 | #!/bin/bash |
2 | echo |
||
3 | |||
4 | interactive=0 |
||
5 | |||
6 | echo $\*=$* |
||
7 | for i in "$*"; do |
||
8 | opt=0 |
||
9 | idx=1 |
||
10 | while [ -n "`echo $i | cut -c $idx`" ] ; do |
||
11 | j=`echo $i | cut -c $idx` |
||
12 | let idx=$idx+1 |
||
13 | if [ "$j" = "-" ]; then |
||
14 | opt=1 |
||
15 | continue 1 |
||
16 | else |
||
17 | if [ $opt -eq 1 ]; then |
||
18 | case "$j" in |
||
19 | "i") interactive=1 ;; |
||
20 | esac |
||
21 | lastopt=$j |
||
22 | else |
||
23 | phrase=$phrase" "$j |
||
24 | fi |
||
25 | fi |
||
26 | done |
||
27 | done |
||
28 | |||
29 | echo opt=$opt |
||
30 | echo idx=$idx |
||
31 | echo lastopt=$lastopt |
||
32 | echo phrase=$phrase |
||
33 | echo interactive=$interactive |
||
34 | echo |