Start tclsh with /bin/sh

#!/bin/sh
# \
source some-env.sh
# \
exec /path/to/tclsh "$0" "$@"
#!/usr/bin/tclsh

puts "use fixed path tclsh"
#!/usr/bin/env tclsh

puts "use user specific tclsh"
#!/bin/sh
# \
exec /long/path/to/tclsh "$0" "$@"

puts "use long path tclsh"
  • "$@" # all the arguments
  • ${1+$@} # all the arguments, if the first argument is set