Skip to content

Instantly share code, notes, and snippets.

View giox069's full-sized avatar

Giovanni Panozzo giox069

  • MySelf
  • Carrè - Italy
View GitHub Profile
@giox069
giox069 / gist:563b23aa889ac3346140b7ff9d8f0003
Last active December 27, 2023 20:27
awk linux command to add a missing Date: header in email/eml file
awk -v date="`date -R`" 'BEGIN{inhdr=1;hasdate=0}/^Date:/{hasdate=1}/^\s*$/ && inhdr==1 && hasdate == 0{print "Date: " date}/^\s*$/ && inhdr == 1{inhdr=0}{print $0}'