Hi all,
Yesterday I was writing a simple script which when run, would create a
directory with today's date and then would take you to the created
dir.Atfirst I thought it will be easy but the 'finding yourself in the
new
directory after running the script' part didn't work out.The script I wrote
is as follows:

#!/bin/sh
cd
DIR=`date --iso`
mkdir `date --iso`
cd "$DIR"

This did create a directory but I wasn't taken to it.After a bit of
experimenting I found out that adding /bin/sh at the end (ie opening any
subshell) does the work.
My question is why does the script work this way?Is there any other way to
do this?

Sushant.
--
______________________________________________________________________
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.

Reply via email to