I'm trying to get a file using SFTP command in the shell script and it fails with "Cannot download non-regular file:". Below is the piece of code I have written.
sftp -v -F /usr/home/.ssh/sftp.config
Also when I try to list the files in the shell script, it gives "Couldn't get handle: Failure" error.
However, If I do the same operation manually(SFTP to get the file), I'm able to get the file successfully without any errors.
Very much confused as why the SFTP command in shell script is not allowing to download the file whereas the same set of commands when manually run works.
Any inputs is greatly appreciated. Thank you so much!!