Thanks Meter 0
Join Date: Aug 2013
Location: Escondido, California
[Q] TCSH: anomaly with <history> called in a shell file
Quick intro: I just found this group while looking for tcsh to load on my Samsung Galaxy 10.1 tablet. First post.
I've been running Linux since 1995, Slackware 1.2 kernel, downloaded the source code over a 1200 Baud MODEM, Gen'd kernels, etc.
I just rooted the tablet and am loading Linux utilities on it.
I downloaded and installed the tcsh I found on here - written by corinna.
1. Question: where is tcsh looking for the .tcshrc file? I made /root my home but I have to source the .tcshrc file (works fine).
I use <.logout> to copy my <history> to a logfile. I find this to be a great idea - because if something gets messed-up, I can backtrace the commands. Every year I copy it to history.[year] and can look up everything I've ever done to the system.
2. The anomaly: If I do "history >> logfile" on the command line, it works as expected - but if I put that command in a shell file, the history does nothing.
echo `date` >> /root/Log/history.log
history >> /root/Log/history.log
cp /dev/null /root/.history
The dates appear in the file, but no data from the history.
I am THRILLED that corinna ported tcsh to Android - because it is my favorite shell.