Page 1 of 1

Executing a change directoru command through a script

Posted: Thu Dec 17, 2009 12:32 pm
by gaurav.shetti
Hi,
This is what I am doin inside my script:

<$loc_db="/libraries/mnt/searchfiler/db/ldb">

<exec cd $loc_db></exec>

But the directory does not get changed.

Regards,
Gaurav

Executing a change directoru command through a script

Posted: Thu Dec 17, 2009 2:14 pm
by mark
Unix 101: Changing the current directory in a child program will not affect the parent. "cd" works on the command line because it's built into the shell.

You need to use the built-in cd command of vortex.
<syscp cd $loc_db>

Executing a change directoru command through a script

Posted: Fri Dec 18, 2009 4:24 am
by gaurav.shetti
thanks :)