Subversion Repositories LCARS

Rev

Rev 15 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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