Hi:
I am wondering if anyone has a logon script to be put in /etc/profile or environments that will display the logged on username and path?
echo "$USER" # shows username
echo "$(pwd)" # shows current work dir
but I'm not quite sure if thats what you've been looking for.
Darwin
Edit /etc/profile and add the following there
n_name=`whoami`
n_date=`date +%m%d%y`
banner ${n_name} ${n_date}
Why do you need to do this ?
I just wnated to show the user logged in and thier path.
Thanks all.
Be careful with the path (in case it's the $PATH variable you'd like to display). /etc/profile is executed before the personal ~/.profile (where PATH usually is altered to fit the users needs) , so the value you display may not be the one the user actually uses.