Below is my script, but it is not working after connecting to the sftp. Please help me with this.
I am not getting any error. It is not getting into the loop.
#!/bin/bash
CURRENT=`pwd`
File_Path=/appinfprd/bi/info/Client/Scripts/Test/
cd $File_Path
sftp STREAM@abc.sxm.com
for D in *;
do
echo $D;
File_count=`find $D -type f| wc -l;`
echo $File_Path$D '|' $File_count >> File_count.txt
done
exit