#!/bin/bash for I in `seq 1 10`;do cut -d: -f1 /etc/passwd |grep"user$I" 2>>/tmp/etc.err || useradd user$I donebash