changeset 12504:045be785a5cc draft

<wib_jonas> `` f=/hackenv/bin/datei; >$f echo $\'#!/bin/sh\\nset -e\\nif let "1<$#"; then echo "datei error: too many command-line arguments. Usage: datei datetimestring"; exit 2; fi\\nexec date ${1:+-d "$1"} "+%Y-%m-%d %H:%M:%S.%3N %z %Z %B %-e %A %G-W%V-%u"\'; chmod a+x "$f"
author HackEso <hackeso@esolangs.org>
date Wed, 03 Jul 2024 17:55:23 +0100
parents 37c076360b12
children 64f8b628d17c
files bin/datei
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/bin/datei	Wed Jul 03 17:53:18 2024 +0100
+++ b/bin/datei	Wed Jul 03 17:55:23 2024 +0100
@@ -1,4 +1,4 @@
 #!/bin/sh
 set -e
-if [[ 1 < $# ]]; then echo "datei error: too many command-line arguments. Usage: datei datetimestring"; exit 2; fi
+if let "1<$#"; then echo "datei error: too many command-line arguments. Usage: datei datetimestring"; exit 2; fi
 exec date ${1:+-d "$1"} "+%Y-%m-%d %H:%M:%S.%3N %z %Z %B %-e %A %G-W%V-%u"