changeset 11686:10d612def8ee draft

<b_jonas> perl -e for $e ("i","u"){ $f="bin/date$e"; open my$i,"<",$f or die "error open $f r"; local$/; $s=<$i> or die; $s=~s/"\\+%Y/\\${d:+-d "\\$d"} $&/ or die; open $o,">",$f or die "error open $f w: $!"; print $o $s or die; close $o or die; print "OK $f\\n" }
author HackEso <hackeso@esolangs.org>
date Fri, 04 Jan 2019 21:29:08 +0000
parents c9235372b6e5
children d2b36b28643d
files bin/datei bin/dateu
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/bin/datei	Tue Jan 01 22:49:18 2019 +0000
+++ b/bin/datei	Fri Jan 04 21:29:08 2019 +0000
@@ -1,2 +1,2 @@
 #!/bin/sh
-exec date "+%Y-%m-%d %H:%M:%S.%N %z %Z %B %-e %A %G-W%V-%u"
+exec date ${d:+-d "$d"} "+%Y-%m-%d %H:%M:%S.%N %z %Z %B %-e %A %G-W%V-%u"
--- a/bin/dateu	Tue Jan 01 22:49:18 2019 +0000
+++ b/bin/dateu	Fri Jan 04 21:29:08 2019 +0000
@@ -1,2 +1,2 @@
 #!/bin/sh
-exec date -u "+%Y-%m-%d %H:%M:%S.%N %z %Z %B %-e %A %G-W%V-%u"
+exec date -u ${d:+-d "$d"} "+%Y-%m-%d %H:%M:%S.%N %z %Z %B %-e %A %G-W%V-%u"