All pastes #212887 Raw Edit

Something

public shellscript v1 · immutable
#212887 ·published 2006-10-21 02:49 UTC
rendered paste body
#!/bin/bash# This shell script runs automated tests on programs.typeset SYNOPSIS="SYNOPSIS: $0 <directory>"typeset directory="$1"typeset firstpart;if [ -d "$directory" ]then	# directory exists, therefore continue	for executable in "$directory/*.exe"	do		printf "%s\n" $executable		firstpart=`echo $executable | sed 's/.exe$//'`		echo "firstpart is $firstpart"	doneelif [ $# -lt 1 ]then	echo "No directory specified."	echo "$SYNOPSIS"else	echo "\"$directory\" is either not a directory or doesn't exist."	echo "$SYNOPSIS"fi