In Linux shell do all commands that work in a shell script also work at the command prompt? -
i'm trying interactively test code before put script , wondering if there things behave differently in script?
when execute script has own environment variables inherited parent process (the shell executed command). exported variables visible child script.
more information:
- http://en.wikipedia.org/wiki/environment_variable
- http://www.kingcomputerservices.com/unix_101/understanding_unix_shells_and_environment_variables.htm
by way, if want script run in same environment shell executed in, can point command:
. script.sh
this avoid creating new process shell script.
Comments
Post a Comment