lua-users home
lua-l archive

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