Skip to content

Instantly share code, notes, and snippets.

@rondinif
Created March 30, 2014 10:14
Show Gist options
  • Save rondinif/9870604 to your computer and use it in GitHub Desktop.
Save rondinif/9870604 to your computer and use it in GitHub Desktop.
Come ottenere il nome dell'ultimo file scaricato, come copiare l'ultimo file scaricato in file di lavoro temporaneo.
> ls -t ~/Downloads | head -1
LISTA_MOVIMENTI_20140330101644484.csv
> cp `ls -t ~/Downloads | head -1` workfile.csv
@rondinif
Copy link
Author

Compare the content of a baseline file with the content of the last downloaded file:

baseline=/path/to/the/baseline 
lastdwnld=~/Downloads/`ls -t ~/Downloads | head -1`
diff $baseline $lastdwnld 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment