File: dseq-cnt.1.sh

package info (click to toggle)
dateutils 0.4.11-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,228 kB
  • sloc: ansic: 22,598; makefile: 1,771; yacc: 202; sh: 168; lex: 108
file content (18 lines) | stat: -rwxr-xr-x 366 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

BEG="1917-01-01"
END="4095-12-31"

TOOLDIR="$(pwd)/../src"

DSEQ="${TOOLDIR}/dseq"
DDIFF="${TOOLDIR}/ddiff"

cnt_seq="`"${DSEQ}" "${BEG}" "${END}" | wc -l`" || exit 1
cnt_seq="$(( ${cnt_seq} - 1 ))" || exit 1
cnt_diff="`"${DDIFF}" "${BEG}" "${END}"`" || exit 1

if test "${cnt_seq}" != "${cnt_diff}"; then
	echo "'${cnt_seq}' != '${cnt_diff}'"
	exit 1
fi