Advertisement
Guest User

1qaz

a guest
Nov 17th, 2016
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. #!/bin/bash
  2. for i in $(ls owncloud_import); do
  3. for s in $(cat "owncloud_import/$i"); do
  4. export PASSWORD=$(pwgen -s 20 1)
  5. export GROUP=$i
  6. export EMAIL=$s
  7. export USERNAME=$(echo ${EMAIL,,} |cut -d '@' -f 1)
  8. TEMP=$(echo $USERNAME |cut -d '.' -f 1)
  9. export FIRSTNAME=${TEMP^}
  10. TEMP=$(echo $USERNAME |cut -d '.' -f 2)
  11. export LASTNAME=${TEMP^}
  12. echo "user: $USERNAME pass: $PASSWORD name: $FIRSTNAME $LASTNAME mail: $EMAIL group: $GROUP"
  13. done
  14. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement