-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathjottable
executable file
·66 lines (59 loc) · 1.26 KB
/
jottable
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
57
58
59
60
61
62
63
64
65
#!/bin/sh
#
# jottable
#
# Starbase Data Tables - An Ascii Database for UNIX
#
# copyright 1991, 1993, 1995, 1999 John B. Roll jr.
#
PATH=.:/bin:/usr/bin
pastetable=pastetable
case $0 in
*gridtable) pastetable=cprodtable ;;
esac
while [ $# != 0 ] ; do
case $1 in
-D) debug=1 ;;
-g) pastetable=cprodtable ;;
-?)
if [ "$column" = "" ] ; then
default="$default $1"
else
switch="$switch $1"
fi ;;
[-.0-9]*)
if [ "$column" = "" ] ; then
default="$default $1"
else
number="$number $1"
fi ;;
*)
if [ "$column" = "" ] ; then
column=$1
else
if [ "$default $number" = " " ] ; then
echo "jottable: no data specification" 1>&2
exit 1
fi
command="$command \"| _jot $switch $default $number | fldtotable $column\""
number=""
switch=""
column=$1
fi
esac
shift
done
if [ "$column" = "" ] ; then
echo "jottable: no column names found" 1>&2
exit 1
fi
if [ "$default $number" = " " ] ; then
echo "jottable: no data specification" 1>&2
exit 1
fi
command="$command \"| _jot $switch $default $number | fldtotable $column\""
if [ "$debug" = 1 ] ; then
echo $pastetable $command
else
eval $pastetable $command
fi