+ hash sed
+ if [[ $? != 0 ]]; then
+ echo "Can't find sed, exiting"
+ exit 3
+ fi
+ SEDCOMMAND=$(hash -t sed)
+else
+ if [[ ! -x $SEDCOMMAND ]]; then
+ echo "Can't find sed at $SEDCOMMAND, exiting"
+ exit 3
+ fi
+fi
+
+if [[ -z $WCCOMMAND ]]; then
+ hash wc
+ if [[ $? != 0 ]]; then
+ echo "Can't find wc, exiting"
+ exit 3
+ fi
+ WCCOMMAND=$(hash -t wc)
+ WCCOMMAND="$WCCOMMAND -l"
+else
+ if [[ ! -x $WCCOMMAND ]]; then
+ echo "Can't find wc at $WCCOMMAND, exiting"
+ exit 3
+ fi
+ WCCOMMAND="$WCCOMMAND -l"