Differences

This shows you the differences between the selected revisions of the page.

2006-06-19 2006-08-16
3.8.2 script on standard input (martin) Downloading the most recent file (martin)
Line 37: Line 37:
# Remove the temporary file. # Remove the temporary file.
rm /tmp/*.unique rm /tmp/*.unique
 +exit
 +</code>
 +
 +===== Downloading the most recent file =====
 +The script below requires opening separate [[shell session]] to invoke remote-side scripting.
 +
 +<code winscp>
 +# Make copy of the most recent file using remote command to new name
 +# with unique extension to easily find the file in the temporary directory.
 +call cp `ls -t | head -1` /tmp/`ls -t | head -1`.latest
 +# Download all the files with the unique extension.
 +# There should be only one, the one just created.
 +# While downloading, remove the unique extension.
 +get /tmp/*.latest *.
 +# Remove the temporary file.
 +rm /tmp/*.latest
exit exit
</code> </code>

Last modified: by martin