Hello, I need to figure out how to create a shell
script that iterates 9000 times to create users.
so far i have this:
#!/bin/sh
#Script adds multiple users into the Service manager
i=0
for i in 1 * 9000
do
./insuser /WideSpan/config/vipclient.conf $i $i password 0 Org1 UserGroup1 'A' 1 "" "" root
done
Am I on the right track ?
You can do something like that:
#!/bin/sh
#Script adds multiple users into the Service manager
i=1
while [ $i -le 9000 ]
do
./insuser /WideSpan/config/vipclient.conf $i $i password 0 Org1 UserGroup1 'A' 1 "" "" root
i=`expr $i + 1`
done
Jean-Pierre.
Except that, instead of calling an external command 9,000 times, use the shell to do the arithmetic:
i=$(( $i + 1 ))
All *nix systems within the last 15 years have shells that perform integer arithmetic.