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

    set $PATH via ./

    I want to set paths via my own script (
    export PATH=$PATH:/usr/bin/python2.5:~/www/bin
    export PYTHONPATH=$PYTHONPATH:/usr/bin/python2.5:~/www/site-packages
    mainly because I fo not have an access to my home folder, so no bash.rc

    my question is why after running the script ./
    there is no effect!!

    if I execute the commands manually one by one, it is all OK.

    maybe I'm missing something in the script?

  2. #2
    source your file, instead of running it, e.g.:

  3. #3
    hmm it works!
    so whats the difference?

  4. $spacer_open
  5. #4
    When you run it (./, you are doing everything in a new shell (which then exist when the script completes). When you source it (., you are doing everything in your current shell. This is how profiles scripts work (/etc/bashrc, ~/.bashrc, etc.), they are sourced at login time.

Posting Permissions

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