Advertisement
Guest User

Untitled

a guest
Oct 19th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #!/bin/bash
  2. usuarios=()
  3. for i in $( getent group users ); do
  4. usuarios+=$i
  5. done
  6. if [ $1 = "-b" ] ; then
  7. if [ ${#usuarios[@]} -ge $2 ]; then
  8. echo ${usuarios[ $(expr $2 - 1) ]}
  9. fi
  10. fi
  11. if [ $1 = "-l" ]; then
  12. echo ${#usuarios[@]}
  13. fi
  14. if [ $1 = "-i" ]; then
  15. echo "hola"
  16. echo ${usuarios[@]}
  17. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement