I have defined the below for and if condition in a function. For the first time it runs well. Second time it doesn't gets executed after the for loop, it just writes the echo statement. Why does it behave like this?
for outputFile in $outputFiles
do
echo"Output file is $outputFile"
if [ $outputFile == sampple*.pdf ]; then
FromFile=$OutputFilePath
transferFiles
fi
done