Hi
I have wrote the small script, where $SRC=$HOME
the input file is simple text file having directories in my $SRC on pre line
desktop
download
myfiles
games
#!/bin/bash
FILENAME=$1
ERROR_LOG="$SRC/err.$$.log"
while read line
do
echo "########## strat Gmake $line #######" >$ERROR_LOG
echo $line >>$ERROR_LOG
cd $SRC
cd $line
echo `pwd` >>$ERROR_LOG
#gmake
cd $SRC
echo "############ End of Gmake $line #######">>err.$$.log
done < $FILENAME
I am expecting this to print [strat Gmake $line] .... [End of Gmake $line] section for every directory, available in the input file.
Kindly help to if my expectation is wrong from this code ... as I m not getting desired result. it is just printing the section [strat Gmake $line] .. [End of Gmake $line] for last directory in the input file.
Someone help me out to understand where is the catch