Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

KingCleo

adding a date to the file I am transferring

I am using SCP in a Unix script with the following command.

scp -P 222 -B /mydirectory/myfile.txt myuserid@00.00.000.000:incoming
The above command works fine, but what I really need to be able to do, which I currently do with FTP is append the date to the file when sending. SO I tried this and it fails.
Obviously there are different commands for SCP than FTP. Any help with this would be appreciated!


export DATE2=`date '+%Y%m%d'`

scp -P 222 -B /mydirectory/myfile.txt.$DATE2 myuserid@00.00.000.000:incoming