Results 1 to 8 of 8

Thread: bash.bashrc profile file editing problem

  1. #1
    Join Date
    Sep 2008
    Beans
    5

    bash.bashrc profile file editing problem

    Hello all,
    Iam suing ubuntu 7.04 desktop on my laptop.I was installing the perl program then decided to set the path by editing the bash.bashrc profile file.After setting the path,then I got the following message when i started the terminal commmand:
    bash: lesspipe: command not found
    bash: The: command not found
    bash: sudo: command not found
    bash: dircolors: command not found
    bash: The: command not found
    bash: sudo: command not found
    bash: uname: command not found
    bash: uname: command not found
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: sed: command not found
    bash: complete: is: no completion specification
    bash: complete: currently: no completion specification
    bash: complete: not: no completion specification
    bash: complete: installed.: no completion specification
    bash: complete: You: no completion specification
    bash: complete: can: no completion specification
    bash: complete: install: no completion specification
    bash: complete: it: no completion specification
    bash: complete: by: no completion specification
    bash: complete: typing:: no completion specification
    bash: complete: apt-get: no completion specification
    bash: complete: install: no completion specification
    bash: complete: sed: no completion specification

    I'm not in the root account,so I cannt edit it.How can I edit it again or delete the added lines in bash.bashrc file?.
    Thank you in advance for your help.
    mam

  2. #2
    Join Date
    Nov 2007
    Location
    York, UK
    Beans
    473
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: bash.bashrc profile file editing problem

    Quote Originally Posted by mam2008 View Post
    Hello all,
    Iam suing ubuntu 7.04 desktop on my laptop.I was installing the perl program then decided to set the path by editing the bash.bashrc profile file.After setting the path,then I got the following message when i started the terminal commmand:
    bash: lesspipe: command not found
    bash: The: command not found
    bash: sudo: command not found
    bash: dircolors: command not found
    bash: The: command not found
    bash: sudo: command not found
    bash: uname: command not found
    bash: uname: command not found
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: sed: command not found
    bash: complete: is: no completion specification
    bash: complete: currently: no completion specification
    bash: complete: not: no completion specification
    bash: complete: installed.: no completion specification
    bash: complete: You: no completion specification
    bash: complete: can: no completion specification
    bash: complete: install: no completion specification
    bash: complete: it: no completion specification
    bash: complete: by: no completion specification
    bash: complete: typing:: no completion specification
    bash: complete: apt-get: no completion specification
    bash: complete: install: no completion specification
    bash: complete: sed: no completion specification

    I'm not in the root account,so I cannt edit it.How can I edit it again or delete the added lines in bash.bashrc file?.
    Thank you in advance for your help.
    mam
    well i don't know what you've done to your bashrc file but to edit it with root rights you can run this command:

    Code:
    sudo nano ~/.bashrc
    if however bash is so borked on your profile that you can't run the command without loads of errors you will need to boot into recovery mode (an option after pressing ESC when your computer is loading GRUB at startup). then run the above command.

  3. #3
    Join Date
    Sep 2008
    Beans
    5

    Re: bash.bashrc profile file editing problem

    tangibleorange,
    Thank you for your help,but it still giving error that it cannot find sudo command even in the recovery mode.,changed the session but still getting the same error.How can I enable the root account? Iam confused I dont know what to do,please any idea,appreciated

  4. #4
    Join Date
    Oct 2007
    Beans
    456

    Re: bash.bashrc profile file editing problem

    Most likely your path variables have been messed up, you can try asking your terminal

    Code:
    echo $PATH
    if it doesnt look like this:

    Code:
    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin
    you will need to replace them using
    Code:
    export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin"
    FYI to the poster above, i think the op is talking about the bash.bashrc file in /etc/ which requires root permissions to edit, not the user ~.bashrc file, either way he wouldn't need root permissions to edit it.

    However, none of that will work as your paths are broken :S ->

    If you just want to edit your bash.bashrc (as you are already logged in as root) you can use

    Code:
    nano /etc/bash.bashrc
    If you found the solution to your problem, or not - please come back and tell us. If it worked, mark the thread as solved, if it didn't ask for further help. A thankyou never hurts, too! A question is the beginning of knowledge.

  5. #5
    Join Date
    May 2008
    Location
    Philippines
    Beans
    523
    Distro
    Ubuntu

    Re: bash.bashrc profile file editing problem

    Quote Originally Posted by mam2008 View Post
    Hello all,
    Iam suing ubuntu 7.04 desktop on my laptop.I was installing the perl program then decided to set the path by editing the bash.bashrc profile file.After setting the path,then I got the following message when i started the terminal commmand:
    bash: lesspipe: command not found
    bash: The: command not found
    bash: sudo: command not found
    bash: dircolors: command not found
    bash: The: command not found
    bash: sudo: command not found
    bash: uname: command not found
    bash: uname: command not found
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: sed: command not found
    bash: complete: is: no completion specification
    bash: complete: currently: no completion specification
    bash: complete: not: no completion specification
    bash: complete: installed.: no completion specification
    bash: complete: You: no completion specification
    bash: complete: can: no completion specification
    bash: complete: install: no completion specification
    bash: complete: it: no completion specification
    bash: complete: by: no completion specification
    bash: complete: typing:: no completion specification
    bash: complete: apt-get: no completion specification
    bash: complete: install: no completion specification
    bash: complete: sed: no completion specification

    I'm not in the root account,so I cannt edit it.How can I edit it again or delete the added lines in bash.bashrc file?.
    Thank you in advance for your help.
    mam
    It happened to me 3 times.

    Here is what I did to fix it.

    Boot from live CD, mount the hardisk volume and
    Then edit your bash.bashrc file
    save it. then boot from my hard disk
    then GOOD! It is fixed.. Easy as that.....
    ~humanity to everyone and everything~

  6. #6
    Join Date
    May 2008
    Location
    Philippines
    Beans
    523
    Distro
    Ubuntu

    Re: bash.bashrc profile file editing problem

    next time, before editing an important file have a backup first

    cp importantfile importantfile-backup

    so that when things go wrong, you can easily fix it.
    ~humanity to everyone and everything~

  7. #7
    Join Date
    Sep 2008
    Beans
    5

    Re: bash.bashrc profile file editing problem(SOLVED)

    Megajim and jemate18
    Thank you very much for your help! I have used megajim solution and it works.
    thank you again
    mam

  8. #8
    Join Date
    May 2008
    Location
    Philippines
    Beans
    523
    Distro
    Ubuntu

    Re: bash.bashrc profile file editing problem(SOLVED)

    Quote Originally Posted by mam2008 View Post
    Megajim and jemate18
    Thank you very much for your help! I have used megajim solution and it works.
    thank you again
    mam
    Please mark this thread as SOLVED and click the medal icon at the lower right part of megajim's post to THANK him and so that his reply will be marked as the USEFUL post, so that when others have the same problem, they will immediately find the solution to their answer.
    ~humanity to everyone and everything~

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •