#!/bin/bash
l=$(grep "^UID_MIN" /etc/passwd)
l1=$(grep "^UID_MAX" /etc/passwd)
awk -F':' -v "min=${l##UID_MIN}" -v "max=${1##UID_MAX}" '{ if ( $3 >= min && $3
<= max
) print $0}' /etc/passwd
#!/bin/bash
l=$(grep "^UID_MIN" /etc/passwd)
l1=$(grep "^UID_MAX" /etc/passwd)
awk -F':' -v "min=${l##UID_MIN}" -v "max=${1##UID_MAX}" '{ if ( $3 >= min && $3
<= max
) print $0}' /etc/passwd
Comments
Post a Comment