#!/bin/sh # the next line restarts using wish \ exec tclsh "$0" "$@" # vt.tcl: example v4 script set pname vt set if "" set of "" set r [eval "exec vtkparse if= of= -v - with $pname $argv"] eval $r if { [info exists OPT ] } { puts "$pname: example v4 script with paramater parsing" puts {[if= ] input file} puts {[of= ] output file} puts {[-v ] verbose mode} exit } set optv [info exists $OPTv] if { $optv } { exec vcp if=$if -v of=$of >@ stdout <@ stdin } else { exec vcp if=$if of=$of >@ stdout <@ stdin }