So, I made a tweak. Please don't repeat after me. There shall be better way.
Here is my .bash_profile fragment.
ppid=`ps l $$ | awk '$3 ~ /[0-9]+/{print $3}'`
isloginshell=`ps l $ppid | awk '$13 ~ /login/{print $13}'`
if [ "$isloginshell" != "" ]
then
/usr/bin/script ~/worklogs/`/bin/date +%Y%m%d-%H%M`.$$.console.log
fi
No comments:
Post a Comment