Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    .bashrc problems

    Hello all,

    I'm relatively new to Linux (~1 year), and am now running a 64-bit Ubuntu 12.10. I can't find any posts that answer my questions. Thus, this post -- my first.

    PROBLEM 1:
    bash: /home/user/.bashrc: line 1: syntax error near unexpected token `('
    bash: /home/user/.bashrc: line 1: `# ~/.bashrc: executed by bash(1) for non-login shells.'

    I compared my ~.bashrc to the etc/skel/.bashrc, and I see no differences, and Line 1 definitely starts with the comment hash #, so there is no reason that I can think of that it should be reading that line at all. I've been ignoring this error for some time and haven't (until now) found it to be (potentially) tied to any *real* problems.

    PROBLEM 2:

    I think this is similar to what another user encountered (*below), because I can source the file $PATH/seadas.env from the terminal but not from within a bash script ( From within a bash script, I get the error "source not found" (regardless of whether I use the '.' or 'source' as my command).

    My shell is /bin/bash, and it doesn't seem to matter if I initiate the script with :
    set -e
    or not, or whether I call it from a different script (which is what I want to do) or call from the terminal. The only way it works is to source the seadas.env file from the terminal and then run the rest of the commands.

    I never had this problem on other machines/distributions, but have yet to get it working on this machine. Could problem 2 be tied to problem 1? Any ideas about how to solve one or both?

    *Older post with a similar problem:

    Thank you for your help!!!


  2. #2

    where does your ~/.bashrc come from ?

    are you sure bash is installed ?
    the default shell on Ubuntu is dash (a more restricted to POSIX shell).

  3. #3
    The command ' echo $SHELL ' gives /bin/bash. Can't tell you "where" ~/.bashrc comes from, but it is there.

    Turned out that it was a permissions problem ---> No execution permission on an NTFS-formatted external hard-drive. Problem solved by moving scripts onto the desktop hard-drive.

  4. $spacer_open

Posting Permissions

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