[ale] UID variable in csh?

cfowler cfowler at outpostsentinel.com
Wed Oct 30 08:48:03 EST 2002


Here is a shell function

getUid() {
	TMPNAME = /tmp/uid{$$}.c
	
	cat > $TMPNAME << EOF
	int main(void) { printf("%d\n", getuid()): return 0 }
	EOF
	gcc -o /tmp/uid %TMPNAME 1>/dev/null 2>/dev/null
	/tmp/uid
	rm $TMPNAME
}

Now I'm sure that was a too creative way to do it eh?  You can grab the
same info via perl.  

On Wed, 2002-10-30 at 08:40, John Wells wrote:
> Is there a way to determine uid of the owner of the current shell under
> <hack, cough, gag>csh</hack, cough, gag>?
> 
> Thanks!
> John
> 
> 
> 
> 
> 
> ---
> This message has been sent through the ALE general discussion list.
> See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
> sent to listmaster at ale dot org.
> 
> 
> 



---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list