vas
public shellscript v1 · immutable#!/bin/tcsh -f@ err = 0foreach com (`ls | grep "\.txt" | cut -d . -f 1`) source $com.txt | diff $com.out - set err_ = $? if ($err_) then echo "$com -> $err_ [FAIL]" else echo "$com -> $err_" endif @ err = $err + $err_endif ($err) then echo "Something went wrong! (Sum of error codes: $err)"else echo "All works fine!"endif