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

Re: Some Bash Alias Statements Work, Others Don't.



Thanks for the note.

Please see my comments interspaced below:

On 10/29/2019 08:50 AM, The Wanderer wrote:
On 2019-10-29 at 07:14, Stephen P. Molnar wrote:

The subject line tells it all!? Debian Stretch (64bit).
(A bit more literally than might have been expected. I've trimmed the
Subject line back down, as it contained a verbatim copy of the entire
message body except for the newlines being replaced by ',,'. That was
purely ridiculous; if you don't know how how it happened, please look
into it, and if you did it on purpose, please keep Subject lines to a
vaguely reasonable length in the future.)
Yes, I do know. A bit of in attention on my part;  Sorry about that

Without warning, or any other indications, some of the alias
statements in my user .bashrc are no longer working!.

The strange thing is that some still are working. Also, if I enter
the complete path to an executable whose alias is NOT working, the
executable works!!!!  Reentering the alias statement in .bashrc does
not restore the function.

If I enter the alias statement in a terminal the alias works for that
session of the terminal.
Can you give some examples of aliases which work and which don't? By
which I mean, paste in the alias-definition line for each one.

At first blush from the given description, my guess would be that bash
is now for some reason not actually reading your .bashrc, but is instead
getting its alias definitions from somewhere else, which happens to
include some but not all of the definitions your own file specifies. If
that's correct, then the aliases which work will be those defined in the
other file, and the most likely ones to keep working are generic ones
like those defined in /etc/skel/.bashrc.

One way to help confirm or refute this would be to add a non-silent
command to your .bashrc - an echo statement, or an invocation of
fortune, or something along those lines; preferably one prior to the
alias definitions, and another after them. If that command's output
appears in a suitably-invoked new shell, then this is the wrong avenue;
if it doesn't, then you might want to start hunting for other files
which contain alias definitions, and try to find out why bash is looking
there instead of where you expect.

The problem, was that, somehow, the permission s of the directory containing the executable were changed to root root. I should have checked that in the beginning and saved the band with.

Please accept my apologies.

--
Stephen P. Molnar, Ph.D.
www.molecular-modeling.net
614.312.7528 (c)
Skype:  smolnar1


Reply to: