File: wspell

package info (click to toggle)
lg-issue47 3-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,776 kB
  • ctags: 237
  • sloc: ansic: 232; sh: 152; makefile: 34; perl: 9
file content (56 lines) | stat: -rw-r--r-- 767 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/sh
#/usr/local/bin/wspell
# a script to spell a word
# by daa 1-11-98
# usage:
# " wspell "
# or
# " wspell <first_letters_of_word> "
# or
# " wspell <first_letters_of_word> <second_input_of_a_portion_word> "

noact () {
echo -n " No action taken... Hit <ENTER> "
read hit
}

if test -z  $1
then
echo -n "
 Enter the First few characte(s) of your word
 As in the \"var\" in \" variable\": "
 read word
else
word=$1
fi
case $word in
"") : noact
 ;;
#
*) :
if test -z $2
then
echo -n "
 Enter a few letters in the word ( Entries are Not required )
 As in the \"abl\" in \"variable\": "
read few
case $few in
"") :
 look $word | less
;;
#
*) :
 look $word | grep $few | less
 ;;
#
esac
else
few=$2
look $word | grep $few | less
fi
;;
#
esac
exit 0
# End of File