#!/bin/sh # Add ID to used ID list if [ $# -lt 1 ] then echo -e "Usage: $0 \"client name\" ID\n" exit elif [ $# -gt 2 ] then echo -e "Usage: $0 \"client name\" ID\n" exit else if [ $2 -gt 9999 ] then echo -e "ID must between 1-9999\n" exit elif [ $2 -lt 10 ] then echo "000$2 $1" >> /etc/IDs elif [ $2 -lt 100 ] then echo "00$2 $1" >> /etc/IDs elif [ $2 -lt 1000 ] then echo "0$2 $1" >> /etc/IDs else echo "$2 $1" >> /etc/IDs fi fi