![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Development Releases: Linux Mint 4.0 Beta "Fluxbox", 4.0 Alpha "Debian" | iBot | UNIX and Linux RSS News | 0 | 01-04-2008 03:00 PM |
| Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`" | Lokesha | UNIX for Dummies Questions & Answers | 4 | 12-20-2007 01:52 AM |
| What is difference between "endl" and "\n"? | krishna_sicsr | High Level Programming | 4 | 09-17-2007 05:02 PM |
| Where can I read about the difference between "..profile" and ".profile" | zorrokan | UNIX for Dummies Questions & Answers | 2 | 09-05-2007 01:35 AM |
| what difference between "terminal" and "console" | chenhao_no1 | High Level Programming | 1 | 09-09-2002 09:46 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
The dot-command (e.g.: . myscript.sh) means read in the file in the current shell and execute it line-by-line
On the other hand, executing any of the following: sh myscript.sh ksh myscript.sh myscript.sh (assuming that myscript.sh has +x for me) results in calling a child shell and executing myscript.sh in the child's environment. Obviously, in the first form, any change in the environment (i.e. by commands like "cd <another-directory>") will happen in the current shell while in any of the second forms, they are happening in the child's environment and the current one is left unchanged. |
| Sponsored Links | ||
|
|