#!/bin/bash SERIAL=`head SERIAL` if [[ -z $SERIAL ]]; then SERIAL=11111 echo_block "WARN: no file 'SERIAL' found, using default 11111 as the serial # for CA" else PLUS1=$((SERIAL+1)) echo $PLUS1 > SERIAL fi