Last active
October 10, 2018 15:59
-
-
Save zsnmwy/c0adce6f2d7ac8d3277af4fed1a52d0e to your computer and use it in GitHub Desktop.
Use stat and date to get the file day of week
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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