#! /bin/zsh source ${0:h}/be-paths # ./be-paths count-lines () { if [[ $1 == "--clear" ]]; then local dir=$2 for f in $dir/*(N); do sudo chown $USER $f echo -n > $f done else local dir=$1 local file=$2 local file_path=$dir/$file watch -t -n 0.1 "wc -l $file_path | cut -d\" \" -f 1; echo -n $file" fi } clear-signals () { count-lines --clear $EXPERIMENT_SIGNAL_PATH } clear-outputs () { count-lines --clear $AUDIO_OUTPUT_PATH } count-signals () { count-lines $EXPERIMENT_SIGNAL_PATH $1 } count-outputs () { count-lines $AUDIO_OUTPUT_PATH $1 } count-signals-no-be () { count-signals no_interference } count-signals-freeze () { count-signals throttle } count-signals-do-not-freeze () { count-signals do_not_throttle } count-outputs-no-be () { count-outputs no_interference } count-outputs-freeze () { count-outputs throttle } count-outputs-do-not-freeze () { count-outputs do_not_throttle }