How would you go about getting a file from a SFTP server if the file has today date in the name of file?
I know the mget and get command is used to pull the file over, but I can't seem to find anything on pulling a file if it has a certain timestamp on it. I'm trying to write a bash script to pull this file down every morning but the name of the file changes everyday.
Example of the file I am trying to get pulled down from a sftp:
get arc.20201005.*
What I have tried:
get arc.$(date +%Y%m%d).*
get arc.(date +%Y%m%d).*
sftpor could you usescp?arc.20201005.*work as expected? Have you tried:get arc.$(date +%Y%m%d).\*? I'm wondering if your local shell is expanding the *.