[Top][All Lists]

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

Re: some unknown bug, says : command not found

From: Greg Wooledge
Subject: Re: some unknown bug, says : command not found
Date: Mon, 1 Nov 2021 12:03:48 -0400

On Mon, Nov 01, 2021 at 04:53:12PM +0100, Alex fxmbsw7 Ratchev wrote:
> coming from non -x :
> . ~/.bashrc
> bash: : command not found
> bash: : command not found

Because this is you, I can't be sure whether you are correctly pasting
the output from your terminal into email, or retyping it with who-knows-what

*IF* this is a true paste of the output from a terminal, then it appears
you've got an invisible character in the command position.


unicorn:~$ ^A
bash: $'\001': command not found

You see that there are two colons in the output, and a space after the
first colon.  In between that first space and the second colon, you see
the command that bash is complaining about.

If I try to run a non-breaking space as a command, then I see this:

bash:  : command not found

You may not be able to see it easily, but there are two non-breaking
space characters pasted above, one in each line.  The characters between
the two colons on the second line are bash's space, and the non-breaking
space that I typed.

It's very hard to imagine what kind of character you could have typed
to produce the output you showed in your email.  But my knowledge of
the gory entrails of Unicode is pretty limited, so who knows what it
could be.

Or, you might have simply mis-represented the output.  That's my guess.

> set -x goes
> set -x ; . ~/.bashrc ; set +x
> + . /root/.bashrc                                                 ++ .
> /root/xbl5/xbl /root/xbl5e/ps1x
> +++ set -mb                                                       +++ shopt

This is mangled beyond recognition.  You've got missing newlines, or
newlines replaced by a multitude of spaces, or... *sigh*.

All I can tell you is:

1) Identify WHICH FILE the error is actually coming from.  You've probably
   got some multi-layer hierarchy of sourced/dotted-in files.  The first
   step will be to figure out *which* one has the problem.  Do this by
   commenting things out, or by dotting in the second-tier files manually,
   or whatever it takes.

2) Once you know the real file that has the problem, use a hex dumper, or
   a hex editor, or whatever tools you feel will help you, to find the
   invisible or unprintable character.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]