skill -KILL -u $user Command on Max OS X? Is there an alternative for the skill -KILL -u $user command on the Mac OSx. The basic requirement is I want to log out my current logged in user at end of shell script

This program logs out Linux log in user .
From the man page of skill


  These tools are obsolete and unportable.  The command syntax is poorly defined. Consider using the killall, pkill, and pgrep commands instead.


so you could use pkill -KILL -u uid.

But why kill every process with the KILL signal? You can just call exit after your script:

script.sh ; exit