You are not logged in.

#1 2017-06-01 17:02:48

benwis
Member
Registered: 2017-05-30
Posts: 11

[SOLVED]Bash not running interactively

I edited a few different files, and ran an update, but now bash is giving me a strange prompt when the window is loaded. It says:
# ~/.bashrc
#

# If not running interactively, dont: No such file or directory

I'm not sure what this means, but I'm running it natively on my desktop, so its not an interactive shell. Can anyone provide some guidance on fixing it?

Last edited by benwis (2017-06-01 17:50:55)

Offline

#2 2017-06-01 17:14:28

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,546
Website

Re: [SOLVED]Bash not running interactively

It looks like you bashrc is being echoed/catted and you may have uncommented a comment line.  Please post the contents of your /etc/profile /etc/bash.bashrc and ~/.bashrc in code tags.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2017-06-01 17:51:32

benwis
Member
Registered: 2017-05-30
Posts: 11

Re: [SOLVED]Bash not running interactively

You're absolutely right. An apostrophe was before the comment on the first line. Fixing that fixed it.

Thanks

Offline

#4 2017-06-01 19:35:18

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,546
Website

Re: [SOLVED]Bash not running interactively

Huh, I hadn't even thought of that, specifically.  But it makes perfect sense.  I thought it was odd that the comment ended at "dont", but there is an apostrophe there in the original file.  But an apostrophe is also a single quote, so everything from the single quote at the start of the file to the don was treated as a single token for the shell, and as there was no space, the t was also added.  That multiline block of text was seen as the first token/word of a command - which was of course not found.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB