<div dir="ltr">I use "id -un". Works on linux and MacOS (under ksh).<div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, May 13, 2013 at 11:58 AM, Rick Troth <span dir="ltr"><<a href="mailto:rmt@casita.net" target="_blank">rmt@casita.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">There must be two dozen ways to extract the username.<br>
I've coded two or three in the past. Before I do it again, what would<br>
y'all recommend?<br>
<br>
In this case, I need the username, not the UID.<br>
I'm writing a jail that will run another program for which the<br>
username is one of the arguments.<br>
<br>
--<br>
-- R; <><<br>
_______________________________________________<br>
colug-432 mailing list<br>
<a href="mailto:colug-432@colug.net">colug-432@colug.net</a><br>
<a href="http://lists.colug.net/mailman/listinfo/colug-432" target="_blank">http://lists.colug.net/mailman/listinfo/colug-432</a><br>
</blockquote></div><br></div>