I am new to shell scripting
I am trying to dump directories in log file using the following method:
echo -n "Enter Starting Point : "; read SRC
echo $SRC
find $SRC -type d >log.txt
The output of the above code which is supposed to be saved in log.txt, is empty. If I write following code:
echo -n "Enter Starting Point : "; read SRC
echo $SRC
find ~ -type d >log.txt
it works fine. What is wrong with this code?