#!/bin/bash
mkfifo fifiofile
exec 6<> fifofile
echo >&6
echo >&6
echo >&6
echo >&6
echo >&6
for i in {1..60}
do
read -u 6
{
user=user$i
useradd user$i &> /dev/null
if [ $? -eq 0 ]; then
echo "user$i is create"
else
echo "user$i已存在"
fi
echo >&6
}&
done
wait
echo 完成
原文地址:http://blog.51cto.com/13578799/2082632
时间: 2024-10-25 17:53:34