Find the answer to your Linux question:
Results 1 to 2 of 2
[abc(at)xyz ~]$ export $PATH bash: export: `/usr/lib64/mpich2/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/mtaweb/g09/bsd:/home/mtaweb/g09/local:/home/mtaweb/g09/extras:/home/mtaweb/g09': not a valid identifier heres my .bash_profile # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2011
    Posts
    3

    EXPORT : not a valid identifier


    [abc(at)xyz ~]$ export $PATH
    bash: export: `/usr/lib64/mpich2/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/mtaweb/g09/bsd:/home/mtaweb/g09/local:/home/mtaweb/g09/extras:/home/mtaweb/g09': not a valid identifier


    heres my .bash_profile
    # .bash_profile

    # Get the aliases and functions
    if [ -f ~/.bashrc ]; then
    . ~/.bashrc
    fi

    # User specific environment and startup programs

    PATH=/usr/bin:$PATH:$HOME/bin
    export PATH
    export USERNAME

    GAUSS_SCRDIR="/home/user/scratch"
    #GAUSS_LFLAG='-v -nodelist "192.9.200.172"'
    GAUSS_LFLAG='-v -nodelist '
    export GAUSS_LFLAG

    g09root="/home/user"
    GAUSS_SCRDIR1="/home/user/scratch"
    export g09root GAUSS_SCRDIR
    . $g09root/g09/bsd/g09.profile

    LD_LIBRARY_PATH=/usr/lib:/home/user/g09/linda8.2/common/lib:/home/user/openmpi/lib
    and my .bashrc
    # .bashrc

    # Source global definitions
    if [ -f /etc/bashrc ]; then
    . /etc/bashrc
    fi
    alias ifort=/opt/intel/composer_xe_2011_sp1/bin/ifort
    # User specific aliases and functions
    PATH=$PATH:/home/user/cfour_v1/bin
    export PATH

    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/user/openmpi/lib
    export LD_LIBRARY_PATH
    ~

    annoying as hell cant get anything done :/

  2. #2
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    1,211
    When you export a shell variable, you must export the name, not the value. So no "$". But in any case, PATH is already in your environment so you don't need to export it. Changing the value of an environmental variable doesn't mean that it needs to be re-exported.
    "I'm just a little old lady; don't try to dazzle me with jargon!"
    www.hrussman.entadsl.com

Posting Permissions

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