exec shell command
by Ramya[ Edit ] 2009-12-05 19:37:50
exec shell command:
To redirect the current working directory to another folder or directory "exec" command in used in shell scripting.
echo enter file name
read fname
exec<$fname
This will move to the given file name.
For eg,
[root@localhost htdocs]# sh test.sh
enter file name
test
This script will redirect to the test folder and performs the action given.
But it wont move the given directory, it just redirect to the directory.