File: dbfcr.sh

package info (click to toggle)
php3-dbase 1%3A3.0.5-1
  • links: PTS
  • area: non-free
  • in suites: slink
  • size: 264 kB
  • ctags: 596
  • sloc: ansic: 1,826; makefile: 140; sh: 33
file content (30 lines) | stat: -rw-r--r-- 641 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
:
# Copyright (c) 1994 Brad Eacker,
#               (Music, Intuition, Software, and Computers)
# All Rights Reserved
# $Revision: 1.1 $
USAGE="$0 <filename> f_name f_type f_len f_fdc [f_name ... f_fdc] ..."
if [ x$1 = x ] ; then
	echo usage: $USAGE
	exit 1
fi
DBF_LIB=${DBF_LIB-LIB_DEF}
DBFNAME=`basename $1 .dbf`
shift
if [ -f tmpl.dbf ] ; then
	cp tmpl.dbf tmp$$.dbf
else
	cp ${DBF_LIB}/tmpl.dbf tmp$$.dbf
fi
while [ x$1 != x ] ; do
	if [ x$4 = x ] ; then
		echo incorrect number of arguments
		echo usage: $USAGE
		rm tmp$$.dbf
		exit 1
	fi
	dbfadd tmp$$ $1 $2 $3 $4
	shift; shift; shift; shift
done
dbfcreat tmp$$ $DBFNAME
rm tmp$$.dbf