Skip to content

Instantly share code, notes, and snippets.

@zsnmwy
Last active October 10, 2018 15:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zsnmwy/c0adce6f2d7ac8d3277af4fed1a52d0e to your computer and use it in GitHub Desktop.
Save zsnmwy/c0adce6f2d7ac8d3277af4fed1a52d0e to your computer and use it in GitHub Desktop.
Use stat and date to get the file day of week
function Get_files_day_of_week() {
date -d $(stat "${1}" | grep Acc | grep -v '/' | awk '{print $2}' | sed 's/-//g') +%w
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment