Here's a function that allows create simple user accounts in a htpasswd file.
printf "\nThe team has the following members:\n"
cat $VAR_TEAM_ROOT/auth | cut -d: -f1
printf "\nEnter member with password to add:\n"
# until get an empty member name or password
until [ -z "$MEMBER" ] || [ -z "$PASSWORD" ]
read MEMBER PASSWORD
LISTING_TEST "$VAR_TEAM_ROOT/auth" "$MEMBER"
if [ "$?" = 1 ]
# add to auth file
htpasswd -b $VAR_TEAM_ROOT/auth $MEMBER $PASSWORD &> /dev/null
# set trac permissions
trac-admin $VAR_TEAM_ROOT/trac permission remove "$MEMBER" &> /dev/null
trac-admin $VAR_TEAM_ROOT/trac permission add "$MEMBER" developer &> /dev/null
verifies the value entered against the list of users already in the file and returns "1" in case user is not found (what we basically need). In this case user gets added to the file and a "[+]" sign is printed on the next line.
The question is: how can I make the sign appear on the same line name and pass are displayed?
So that it would look like
user password [+
Just out of ideas