#! /bin/bash # script to be launched in a local node to determine the largest integer uid for users in /etc/passwd luid=$(cat /etc/passwd | awk -F":" '{print $1, $3}' | awk '{if($2>=1000 && $2<4000) {print $2}}' | sort | awk 'END {print}' ) echo 'last uid in ' $HOSTNAME is $luid