lua-users home
lua-l archive

godawful sh/Lua polyglot

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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 ...

AltStyle によって変換されたページ (->オリジナル) /