forked from pool/sysuser-tools
20ab9219b9
Initial tool package for the new system user proposal OBS-URL: https://build.opensuse.org/request/show/457437 OBS-URL: https://build.opensuse.org/package/show/Base:System/sysuser-tools?expand=0&rev=1
21 lines
293 B
Bash
21 lines
293 B
Bash
#!/bin/bash
|
|
|
|
parse()
|
|
{
|
|
while read line; do
|
|
[ "${line:0:1}" != '#' ] || continue
|
|
line="${line## *}"
|
|
[ -n "$line" ] || continue
|
|
set -- $line
|
|
if [ "$1" = 'g' ]; then
|
|
echo "group($2)"
|
|
elif [ "$1" = 'u' ]; then
|
|
echo "user($2)"
|
|
fi
|
|
done
|
|
}
|
|
|
|
while read fn; do
|
|
parse < "$fn"
|
|
done
|