EuroTcl 2023 - Jim and Tcl interoperability, Featuring thing o_o, Georg Lehner, 2023-07-20

The Shebang

Explicit

#!/opt/diet/bin/jimsh

Override the interpreter with: tclsh $(which demo)

Tentative

#!/usr/bin/env jimsh

Override like above.

Automatic Interpreter Selection

#!/bin/sh
# -*- mode: tcl -*- \
    hash -r; hash ${TCLSH:-jimsh} 2>/dev/null || hash tclsh 2>/dev/null; \
exec $(hash) "$0" ${1+"$@"}

Override the interpreter with: TCLSH=tclsh demo