#!/bin/sh

TMP=`tempfile`

sed <$1 >$TMP -e '/[[:space:]]*#/d'

# Check for bashisms in a script

if grep -q '{.*,.*}' $TMP; then
	echo "$1: Might use {} Brace Expansion"
	rm $TMP
	exit 1
fi

if grep -q "[[:space:]]~" $TMP; then
	echo "$1: Might use ~ Tilde Expansion"
	rm $TMP
	exit 1
fi

if grep -q '&>' $TMP; then
	echo "$1: Might use special Redirection Symbol &>"
	rm $TMP
	exit 1
fi

if grep -q select $TMP; then
	echo "$1 Might use the select Statement"
	rm $TMP
	exit 1
fi

rm $TMP
exit 0
