Whoops! What did I do to the terminal? [Resolved]

Forum rules
Before you post please read how to get help
Post Reply
red-e-made
Level 5
Level 5
Posts: 526
Joined: Sat Jul 14, 2007 11:31 am

Whoops! What did I do to the terminal? [Resolved]

Post by red-e-made »

Hey all.

Switched to Gloria KDE recently. After opening /etc/bash.bashrc and commenting out /usr/games/fortune, I now get the following message when I open my Terminal:

Code: Select all

bash: /etc/bash.bashrc: line 1: syntax error near unexpected token `('
bash: /etc/bash.bashrc: line 1: `as# System-wide .bashrc file for interactive bash(1) shells.'
bash-3.2$
This doesn't look normal to me. What did I do and how can I fix this?
Last edited by red-e-made on Tue Sep 01, 2009 1:04 pm, edited 1 time in total.
User avatar
optimize me
Level 5
Level 5
Posts: 625
Joined: Wed Jun 03, 2009 5:25 pm

Re: Whoops! What did I do to the terminal?

Post by optimize me »

red-e-made wrote:Hey all.

Switched to Gloria KDE recently. After opening /etc/bash.bashrc and commenting out /usr/games/fortune, I now get the following message when I open my Terminal:

Code: Select all

bash: /etc/bash.bashrc: line 1: syntax error near unexpected token `('
bash: /etc/bash.bashrc: line 1: `as# System-wide .bashrc file for interactive bash(1) shells.'
bash-3.2$
This doesn't look normal to me. What did I do and how can I fix this?
You must have inadvertently hit a key or maybe accidentally commented/deleted something you shouldn't have.

Bash is telling you the problem is on line #1. Fixing it should be easy: Either replace it with, or compare it to, the backup you made of the important system file before you started editing it.

If you're the devil-may-care type who edits system files without first backing up known good versions, you'll probably have to boot up a livecd session and pull the file from there.
AMD Phenom II X6 1045T 2.8GHz 8GB DDR3 RAM ATI Radeon HD6970
User avatar
optimize me
Level 5
Level 5
Posts: 625
Joined: Wed Jun 03, 2009 5:25 pm

Re: Whoops! What did I do to the terminal?

Post by optimize me »

toolz wrote:
optimize me wrote: If you're the devil-may-care type who edits system files without first backing up known good versions, you'll probably have to boot up a livecd session and pull the file from there.
Nope. The obvious file-restore solution for the 'thinkers' among us is to create a new user. With a bit more knowledge you'll know that the files reside in /etc/skel - or you will next time.
Odd that you would say that, tool. :D

My /etc/skel folder contains no bash.bashrc file. :shock:

What's a n00b like me to do now? :oops: I'm too much of a n00b to backup files, so it's safe to assume I don't know how to make new users, either. :( And even if i did make a new user, could you explain to a non-thinker n00b like me why that would create a new bash.bashrc in /etc? :?:
AMD Phenom II X6 1045T 2.8GHz 8GB DDR3 RAM ATI Radeon HD6970
Muzer
Level 4
Level 4
Posts: 220
Joined: Thu Aug 27, 2009 2:09 pm

Re: Whoops! What did I do to the terminal?

Post by Muzer »

On line one, you have typed the characters "as" before the comment marker (the hash - #). Just remove those two characters.
red-e-made
Level 5
Level 5
Posts: 526
Joined: Sat Jul 14, 2007 11:31 am

Re: Whoops! What did I do to the terminal?

Post by red-e-made »

Muzer wrote:On line one, you have typed the characters "as" before the comment marker (the hash - #). Just remove those two characters.
That did the trick, thanks!
Post Reply

Return to “KDE”