godawful sh/Lua polyglot
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: godawful sh/Lua polyglot
- From: Norman Ramsey <nr@...>
- Date: 2020年8月12日 13:27:43 -0400
I'm working on a file that is simultaneously a ksh script and a pandoc
Lua filter. In case someone else finds it useful to have a shell script
and a Lua script be the same file, here's how it opens:
#!/bin/ksh
if false
then --[[
else
case $# in
0) pandoc --lua-filter="0ドル" ;;
*) pandoc --lua-filter="0ドル" "$@" ;;
esac
exit $?
fi
]]
end
... Lua code follows ...