I'm trying to calculate the SHA1 of different TCL scripts in a folder for version checking (my TCL version is 8.5). I want to do this from within one of the TCL scripts, and print this info into a separate file. I thought I could do something like this:
set repoDir "some/repo/dir"
set scripts_hash [cd $repoDir/scripts; exec sha1sum ./* | sha1sum]
puts $file $scripts_hash
However, exec doesn't allow this? How can I execute a sha1sum shell command from within a .tcl script?