changeset 12508:335a2a849232 draft default tip

<wib_jonas> `` f=/hackenv/bin/dateu; >$f echo $\'#!/bin/bash\\nset -e\\nif (( 1 < $# )); then echo "dateu error: too many command-line arguments. Usage: dateu datetimestring"; exit 2; fi\\nexec date -u ${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 18:15:24 +0100
parents 2c465d82bec1
children
files bin/dateu
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/bin/dateu	Wed Jul 03 18:07:19 2024 +0100
+++ b/bin/dateu	Wed Jul 03 18:15:24 2024 +0100
@@ -1,2 +1,4 @@
-#!/bin/sh
+#!/bin/bash
+set -e
+if (( 1 < $# )); then echo "dateu error: too many command-line arguments. Usage: dateu datetimestring"; exit 2; fi
 exec date -u ${1:+-d "$1"} "+%Y-%m-%d %H:%M:%S.%3N %z %Z %B %-e %A %G-W%V-%u"