Mercurial > mercurial > hgweb_kaigo.hg.cgi
diff Perori/addtoday.go @ 0:aaaa401818a1 draft
first commit.
author | pyon <pyon@macmini> |
---|---|
date | Mon, 24 May 2021 21:32:58 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Perori/addtoday.go Mon May 24 21:32:58 2021 +0900 @@ -0,0 +1,14 @@ +package main + +import ( + "io/ioutil" + "os" + "time" +) + +func main() { + t := time.Now().Format("20060102_") + b, _ := ioutil.ReadFile(os.Args[1]) + ioutil.WriteFile(t + os.Args[1], b, 0644) +} +