]> mj.ucw.cz Git - moe.git/blob - bin/mo-get-users
Split installation process.
[moe.git] / bin / mo-get-users
1 #!/bin/bash
2
3 if [ "$1" = --help ] ; then
4         echo "Usage: mo-get-users [--full]"
5 fi
6 [ -f config ] || { echo "Missing config file, check cwd." ; exit 1 ; }
7 set -e
8 . config
9
10 if [ "$1" = --full ] ; then
11         FORM='$1,$5'
12 else
13         FORM='$1'
14 fi
15 awk -F: </etc/passwd "{ gsub(\",.*\",\"\",\$5); OFS=\"\t\"; if (\$3 >= $CT_UID_MIN && \$3 <= $CT_UID_MAX) print $FORM; }"