Ich kann auch kein PerlTK, hab deswegen einfach Perl weggelassen und nur TK (+bash) genommen.
Code:
#!/bin/bash
#path to wich
WISH=/usr/bin/wish8.3
#other common pathes to wish (not used)
#WISH=/usr/bin/wish
#WISH=/usr/X11R6/bin/wish
#WISH=/usr/X11R6/bin/wish8.3
#WISH=wish
#Title for file selection box
TITLE="Select your file:"
#program to run file with
PROG=cat
FILE=`echo 'set fn [tk_getOpenFile -title "'${TITLE}'"]; if {$fn==""} { exit 1} else { puts $fn; exit 0}' | wish` && exec "$PROG" "$FILE"
echo "Error"
exit 1
Lesezeichen