So ls -n looks like this?
-rwxrwxr-x 1 74861 1750560623 10 Jan 27 12:21 list.sh
-rwxr-x--- 1 74861 1750560623 80 Jan 28 09:25 .desk
And lsuser -ca id ALL | grep 74861 gives:
mike001: 74861
If so, it could be the space in front of the userid. How about this:
ls -n $@ | awk -F: '
function max(a,b) {return a>b?a:b}
function toend(str,fld)
{ for(i=0; i<length(str); i++) {
while(substr(str,i,1) != " " && i<length(str)) i++
while(substr(str,i,1) == " " && i<length(str)) i++
if (!--fld) return substr(str,i)
}
return ""
}
BEGIN {
while("lsuser -c -a id ALL" | getline) {
gsub(" ","")
U[$2]=$1; UW=max(UW,length($1))}
while("lsgroup -c -a id ALL" | getline) {
G[$2]=$1; GW=max(GW,length($1))}
}
{
printf "%10s %3s %-*s %-*s %11s %s\n", $1, $2,
UW, $3 in U?U[$3]:$3,
GW, $4 in G?G[$4]:$4,
$5, toend($0,5)
}' FS=" "