Mag Gam on 1 Sep 2007 04:40:51 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] shell script help...

  • From: "Mag Gam" <magawake@gmail.com>
  • To: "Philadelphia Linux User's Group Discussion List" <plug@lists.phillylinux.org>
  • Subject: [PLUG] shell script help...
  • Date: Sat, 1 Sep 2007 00:40:40 -0400
  • Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=oVUtHXsyxXvI4/+NdI+SlOsjyy+/CyPq5yYl24vr82NAViJaupe1eHJWdsyuLWpCE2+dtLzYNA4aqlktMfJru1gxQWjQv+Y3qu0NicvjJLY93ZEm6P/ymbaVg6Ya/YYChn06B12K3N47WW8d2M6ljjuzHcMCMN78XOXkQKjv2Ck=
  • Reply-to: Philadelphia Linux User's Group Discussion List <plug@lists.phillylinux.org>
  • Sender: plug-bounces@lists.phillylinux.org

I am in the process of writing a shell script to take history file (fc -l) and backup it up, while appending it.

My strategy is, once the user exits out of his shell, i will dump the history into a file by using a trap() with EXIT. The file will be appended by the username... (ie, username.history.date

My question is, if a user changes his shell from bash to ksh to tcsh, I am not able to get the output because I have my trap + exit to look at $SHELL.  Is there any way to disable a user to log into a different shell?



___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug