"Fossies" - the Fresh Open Source Software Archive

Member "dateutils-0.4.6/test/dseq-cnt.1.sh" (19 Mar 2019, 366 Bytes) of package /linux/privat/dateutils-0.4.6.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/sh
    2 
    3 BEG="1917-01-01"
    4 END="4095-12-31"
    5 
    6 TOOLDIR="$(pwd)/../src"
    7 
    8 DSEQ="${TOOLDIR}/dseq"
    9 DDIFF="${TOOLDIR}/ddiff"
   10 
   11 cnt_seq="`"${DSEQ}" "${BEG}" "${END}" | wc -l`" || exit 1
   12 cnt_seq="$(( ${cnt_seq} - 1 ))" || exit 1
   13 cnt_diff="`"${DDIFF}" "${BEG}" "${END}"`" || exit 1
   14 
   15 if test "${cnt_seq}" != "${cnt_diff}"; then
   16     echo "'${cnt_seq}' != '${cnt_diff}'"
   17     exit 1
   18 fi