You are not logged in.

#1 2019-08-02 12:37:23

a7med-7amdy
Member
Registered: 2016-08-21
Posts: 9

[SOLVED] default bash.bashrc

I've tried to change bashrc to have Bash color prompt
but it didn't work for me so I restored it to the default settings but it still shows errors

/etc/bash.bashrc: line 4: $'\r': command not found
/etc/bash.bashrc: line 6: $'return\r': command not found
/etc/bash.bashrc: line 7: $'\r': command not found
: invalid shell option namehopt: checkwinsize
/etc/bash.bashrc: line 9: $'\r': command not found
/etc/bash.bashrc: line 11: $'\r': command not found
/etc/bash.bashrc: line 12: syntax error near unexpected token `$'in\r''
'etc/bash.bashrc: line 12: `case ${TERM} in.

this is my /etc/bash.bashrc
https://paste.fedoraproject.org/paste/D … 0VVqnuTGlg

Last edited by a7med-7amdy (2019-08-04 22:47:15)

Offline

#2 2019-08-02 12:45:14

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,423

Re: [SOLVED] default bash.bashrc

How exactly did you "restore it to default settings"? This looks like it got edited and spit out through a Windows editor leaving carriage returns strewn about. Reinstall the bash package.

Last edited by V1del (2019-08-02 12:46:40)

Offline

#3 2019-08-02 12:52:30

Kirill Bugaev
Member
Registered: 2018-08-03
Posts: 173

Re: [SOLVED] default bash.bashrc

Or another variant install zsh and oh-my-zsh with builtin themes and enjoy. wink

Offline

#4 2019-08-02 13:02:10

a7med-7amdy
Member
Registered: 2016-08-21
Posts: 9

Re: [SOLVED] default bash.bashrc

V1del wrote:

How exactly did you "restore it to default settings"? This looks like it got edited and spit out through a Windows editor leaving carriage returns strewn about. Reinstall the bash package.

no I edited it using kate

Offline

#5 2019-08-02 13:08:26

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,423

Re: [SOLVED] default bash.bashrc

Then that was configured incorrectly, regardless, the easiest here would be reinstalling the bash package and then moving the pacnew file over the incorrect copy.

Offline

#6 2019-08-02 13:39:06

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: [SOLVED] default bash.bashrc

Kirill Bugaev wrote:

Or another variant install zsh and oh-my-zsh with builtin themes and enjoy. wink

This is terrible advice. There are many threads here involving problems caused by OMZ. It's a mess.

Offline

#7 2019-08-04 16:12:51

a7med-7amdy
Member
Registered: 2016-08-21
Posts: 9

Re: [SOLVED] default bash.bashrc

V1del wrote:

Then that was configured incorrectly, regardless, the easiest here would be reinstalling the bash package and then moving the pacnew file over the incorrect copy.

excuse me where can I find ( pacnew file)? what's the command exactly

Offline

#8 2019-08-04 16:29:06

loqs
Member
Registered: 2014-03-06
Posts: 19,101

Re: [SOLVED] default bash.bashrc

Offline

#9 2019-08-04 16:36:41

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

Re: [SOLVED] default bash.bashrc

And after you do that, edit you'll be better off editing your ~/.bashrc, not the system-wide file.

FWIW, you could likely resolve this also by simply removing the carriage returns:

sed -i 's/\r//g' /etc/bash.bashrc

Last edited by Trilby (2019-08-04 16:40:25)


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

Offline

#10 2019-08-04 18:27:03

a7med-7amdy
Member
Registered: 2016-08-21
Posts: 9

Re: [SOLVED] default bash.bashrc

I can't find any (pac) file except this one "/etc/default/grub.pacnew" however

sed -i 's/\r//g' /etc/bash.bashrc

resolves my issue, thank you

Offline

#11 2019-08-04 19:27:43

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,493

Re: [SOLVED] default bash.bashrc

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB