Skip to content

Instantly share code, notes, and snippets.

View mdayah's full-sized avatar

Michel Dayah mdayah

  • Micro Computer Services
  • Athens, TN
View GitHub Profile
@mdayah
mdayah / commit_by_date.sh
Created April 6, 2024 18:53
Add and commit files by original date
#!/bin/bash
SCRIPT_NAME=$(basename "$0") # Get the name of the script itself
declare -A fileDates
while IFS= read -r -d '' file; do
if [[ "$file" != *".git"* && "$file" != "./$SCRIPT_NAME" ]]; then
DATE=$(stat -c %y "$file" | cut -d ' ' -f 1)
if [[ -n "$DATE" ]]; then
fileDates["$DATE"]+="$file "

Keybase proof

I hereby claim:

  • I am mdayah on github.
  • I am mdayah (https://keybase.io/mdayah) on keybase.
  • I have a public key ASBmSBhLHuDlE9G8zOZWgh2PGP3eZFF6SSXxBVkOuPD3KQo

To claim this, I am signing this object: