I-Appliance BBS
The Official Source for Internet Appliance Upgrades and Mods

Click Here!
BBS Main List | Sign In | Sign Up | Search | Help | Linux-Hacker.netReply to Thread | Printer |

Home / Other I-Appliances / 3Com Audrey
Why doesn't this script run?
Help

New MessageWhy doesn't this script run? (modified 0 times) davistw1
Profile
I created the below script

#!/bin/sh
export PATH=$PATH:/windows/bin
echo done

This is supposed to add my windows bin share to the path statement so I can run programs from it..

If I execute the export command from a command prompt it works like a champ. However, It does not execute from the shell file. It prints out "done" but the PATH did not change..

Also I can't get this PATH to stick. If I set it up then close the shell, the next time I open a shell I have to set it again.

HELP???

03-10-2002 19:43:50

New MessageRE:Why doesn't this script run? (modified 0 times) jhd3rd
Profile
Your script is running fine. By default, when you run a script, a new shell process is forked and the environment you set up only exists in that process. Once the script ends, the shell is done, and you are back to the environment you started in.

To run the script inside your current shell process, you have to begin the command with a "." (period). For example, if your script is called "myscript", You should run it with:

. myscript

That should leave any environment variables you set in the script still set when the script finishes.

03-11-2002 05:39:58

New MessageRE:Why doesn't this script run? (modified 0 times) davistw1
Profile
I tried that too but still no luck...
I ended up putting it in /kojak/go.....
Thanks.
03-12-2002 18:39:36

Reply to Thread | Printer |
All times are PSTPowered by UltraBoard v1.62



Copyright © 2000, Netmake Inc. All Rights Reserved.
See Terms and Conditions for more information.




i-opener opener laptop notebook computer help drivers dll free windows dos repair fix linux mac macintosh 2000 95 98 nt pc configure hardware software sound video netscape explorer network networking lan wan software cmos fat bios printer card mouse modem ide scsi cd rom controllers scanner tape hard drive cgi scripts source code mp3