Re: Switching from tcsh to bash as an interactive shell
From: Chris F.A. Johnson (cfajohnson_at_gmail.com)
Date: 09/20/04
- Next message: Chris F.A. Johnson: "Re: Switching from tcsh to bash as an interactive shell"
- Previous message: P.T. Breuer: "Re: 3 hard disk loading into linux?"
- In reply to: P.T. Breuer: "Re: Switching from tcsh to bash as an interactive shell"
- Next in thread: Chris F.A. Johnson: "Re: Switching from tcsh to bash as an interactive shell"
- Reply: Chris F.A. Johnson: "Re: Switching from tcsh to bash as an interactive shell"
- Reply: P.T. Breuer: "Re: Switching from tcsh to bash as an interactive shell"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 19 Sep 2004 23:21:53 GMT
On 2004-09-19, P.T. Breuer wrote:
> Chris F.A. Johnson <cfajohnson@gmail.com> wrote:
>> On 2004-09-19, P.T. Breuer wrote:
>> > P.T. Breuer <ptb@oboe.it.uc3m.es> wrote:
>> >> And I keep forgetting to mention, uh, what I keep forgetting.
>> >
>> > Oh yes. I keep forgetting to mention that all these people who witter
>> > on about their marvellous history in bash, LOSE their history as soon
>> > as they log out of a bash shell that doesn't share the same history.
>> >
>> > I.e. don't open two bash shells at once, folks.
>
>> B.S.!!
>
> I beg your pardon?
Granted.
> Is your name Barney Scrotus?
My initials wouldn't warrant one exclamation mark, let alone two.
>> I usually have 3 or 4 open on my desktop machine; I don't lose
>> anything.
>
> The last you close will determine which "latest" history you record.
If they are all writing to the same history file.
> Let's expand ..
>
> Are you perhaps suggesting that the shell append to it throughout
> instead of only at shell termination? Tough - the previous or parallel
> shells also had the file open for writing, and your commands will be all
> mixed up inside if they are all writing at the end all the time. So the
> order will be wrong.
>
> Hyacc.
>
>
>> > (or two tcsh shells, since the same thing will happen in tcsh ...)
>
>> It's probably as easy to avoid losing it in tcsh as it is in
>> bash. (Or maybe it isn't, and that's another reason for not using
>> tcsh.)
>
> It's impossible, due to natural laws, causality, etc. etc. You are
> trying to write a linear sequence of commands. However, the real trace
> of your commands is a forking tree. As soon as you launch another
> shell, the trace forks. Then you have the problem of choosing HOW th
> etree should be linearized.
>
> OK - so what do you choose? The longest trace? That loses the rest. How
> about interleaving the traces in some way? Well, that will wreck
> command order. How about interleaving segmentwise (maintain order
> imbetween branch points)? Tough, but the segments get interleaved.
>
> And then which commands fall off the start of the history file first? Why
> not set your history length to "5" and make a quick test. You'll find
> the last shell to close has the commands retained, nothing else does.
With judicial use of the HISTFILE variable along with the r, a
and w options to history, one or two lines in ~/.bashrc and/or
~/.logout, almost anything is possible. Use a little imagination.
--
Chris F.A. Johnson http://cfaj.freeshell.org/shell
===================================================================
My code (if any) in this post is copyright 2004, Chris F.A. Johnson
and may be copied under the terms of the GNU General Public License
- Next message: Chris F.A. Johnson: "Re: Switching from tcsh to bash as an interactive shell"
- Previous message: P.T. Breuer: "Re: 3 hard disk loading into linux?"
- In reply to: P.T. Breuer: "Re: Switching from tcsh to bash as an interactive shell"
- Next in thread: Chris F.A. Johnson: "Re: Switching from tcsh to bash as an interactive shell"
- Reply: Chris F.A. Johnson: "Re: Switching from tcsh to bash as an interactive shell"
- Reply: P.T. Breuer: "Re: Switching from tcsh to bash as an interactive shell"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|