Chinese zodiac: Difference between revisions
→{{header|UNIX Shell}}: Make bash version work in ksh93+, too
(Added Fōrmulæ solution) |
(→{{header|UNIX Shell}}: Make bash version work in ksh93+, too) |
||
Line 3,700:
=={{header|UNIX Shell}}==
{{works with|Bash|4+}}
{{works with|Korn Shell|93+}}
The required versions introduced support for associative arrays.
<pre>#!/usr/bin/env bash
Line 3,738 ⟶ 3,740:
BaseYear=4
function main
if (( !$# )); then
set -- $(date +%Y)
|