Pipe ls -l to this awk script. You could put the whole thing in a script like myls.
If anyone has something better - please post.
ls -l | awk '{
printf( substr($0,1,1) )
printf( getNumMode(substr($0,2,3)) )
printf( getNumMode(substr($0,5,3)) )
printf( getNumMode(substr($0,8,3)) )
print substr($0,11)
}
function getNumMode( md, value ){
value += (substr(md,1,1) != "-" )? 4 : 0
value += (substr(md,2,1) != "-" )? 2 : 0
value += (substr(md,3,1) != "-" )? 1 : 0
return value
}' Cheers,
ND
bigoldbulldog@hotmail.com