I'm trying to list all users' home directories from a linux host.
You don't need a regex for that, you can get it directly from /etc/passwd. eg:
perl -F: -nae 'print "$F[0] has home dir $F[5]\n" if $F[5];' /etc/pass +wd
Of course, you can change the test in there to be a regex match if you want to restrict the output, but it might be simpler to restrict it by UID range or similar. This should get you started anyway.
In reply to Re: List all Users Directory
by hippo
in thread List all Users Directory
by valerydolce
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |