Filename & Owner

Hi all!
I'm trying to write a script that joins the filename and the owner (e.g. .profile_root , home_smith)

Is there a easy way to do it. I've been trying with a for and playing with ls and head & tail. I would attach what I've had done but is very ugly:o

ls -l | awk '{ print $3, $NF}'

use print $3 $NF if you want them concatenated - smashed together

1 Like