Hi
I am trying to sftp current date file from remote machine but it is no working.
below is the command I am using
sftp root@10.301.31.17 <<EOF
get /home/mohan/scripts/logs/files/*{date +%m%d)*.gz
EOF
Hi
I am trying to sftp current date file from remote machine but it is no working.
below is the command I am using
sftp root@10.301.31.17 <<EOF
get /home/mohan/scripts/logs/files/*{date +%m%d)*.gz
EOF
What and in which way is not working? If you want meaningful help, way more info about the setup and environment is needed.
You know that there are syntactical and logical errors in your command?
More information than "not working" would be helpful, but I think I see some problems immediately:
sftp -b root@10.301.31.17 <<EOF
mget /home/mohan/scripts/logs/files/*$(date +%m%d)*.gz
EOF
Plus: the date
command is executed on the local node. While the respective internal time may be identical, neither the time zone nor the locale settings have to be.