changeset 11688:06331fefa90d 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/\\${1:+-d "\\$1"} $&/ 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:30:13 +0000
parents d2b36b28643d
children 850539c2ee11
files bin/datei bin/dateu
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/bin/datei	Fri Jan 04 21:29:43 2019 +0000
+++ b/bin/datei	Fri Jan 04 21:30:13 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 ${1:+-d "$1"} "+%Y-%m-%d %H:%M:%S.%N %z %Z %B %-e %A %G-W%V-%u"
--- a/bin/dateu	Fri Jan 04 21:29:43 2019 +0000
+++ b/bin/dateu	Fri Jan 04 21:30:13 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 ${1:+-d "$1"} "+%Y-%m-%d %H:%M:%S.%N %z %Z %B %-e %A %G-W%V-%u"