Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- usuarios=()
- for i in $( getent group users ); do
- usuarios+=$i
- done
- if [ $1 = "-b" ] ; then
- if [ ${#usuarios[@]} -ge $2 ]; then
- echo ${usuarios[ $(expr $2 - 1) ]}
- fi
- fi
- if [ $1 = "-l" ]; then
- echo ${#usuarios[@]}
- fi
- if [ $1 = "-i" ]; then
- echo "hola"
- echo ${usuarios[@]}
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement