Need your help in putting multiple files in the server. I have created a script but it is not putting all the files
cd /buffer/miscellaneous/new/ cd $(ls -t | head -n 1) latest=$(find -mmin -60 | cut -d'/' -f2 | tail -n +2 | tr '\n' '\t') /usr/local/bin/sshpass -p password sftp -oBatchMode=no adris@XX.XXX.XXX.XX:/folder1 << 1 mput $latest* bye
For this command
find -mmin -60 | cut -d'/' -f2 | tail -n +2 | tr '\n' '\t'
Output is 2 csv files:
Now the issue is
mput is putting only the first file and not putting the other files.
The output of the find command is as follows
find -mmin -60 . ./cgi_20110911_135504.csv ./cgi_20111210_235524.csv ./cgi_20203127_125504.csv