Mercurial > repo
annotate bin/fromroman @ 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 | 00ccb2fe8c08 |
children |
rev | line source |
---|---|
5643 | 1 #!/usr/bin/perl |
12420
00ccb2fe8c08
<wib_jonas> python3 -cn="/hackenv/bin/fromroman";s=open(n).read();o=s.replace(\'{(sh\',\'{uc((sh\').replace(\'0]}\',\'0])}\');print(o);open(n,"w").write(o);print("write successful");
HackEso <hackeso@esolangs.org>
parents:
5643
diff
changeset
|
2 sub k{my$t;$t=~y/IVXLC/XLCDM/,$t.=("",I,II,III,IV,V,VI,VII,VIII,IX)[$_]for/./g;$r{$t}=$_;$t}k for s""\$"..4e3;print $r{uc((shift=~/(\w+)/)[0])},$/ |