On 8/5/07, Vaibhav Kulkarni <[EMAIL PROTECTED]> wrote: > Try sourcing your script.
Oh, I forgot to mention the reason why it doesn't work in your case. When you run your script, a sub-shell is created, which cd's into that particular directory. When the script is done, the sub-shell exits and you are returned to the 'main' shell, which is still in the original directory. Now when you add /bin/sh in the script, it spawns a sub-sub-shell, which inherits the current directory from the sub-shell, which is your newly created date folder. Sourcing a scripts runs the commands in the current shell, instead of spawning a sub-shell. -- Vaibhav -- ______________________________________________________________________ Pune GNU/Linux Users Group Mailing List: ([email protected]) List Information: http://plug.org.in/cgi-bin/mailman/listinfo/plug-mail Send 'help' to [EMAIL PROTECTED] for mailing instructions.
