21 lines
465 B
Bash
21 lines
465 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin
|
||
|
|
||
|
FILES=""
|
||
|
SCRIPTNAME=$(basename $0)
|
||
|
DIRS="/opt/SGE/local/scripts/${SCRIPTNAME}.d /usr/local/etc/gridengine/${SCRIPTNAME}.d"
|
||
|
for DIR in ${DIRS} ; do
|
||
|
if [ -d ${DIR} ] ; then
|
||
|
if [ ! -z $(ls ${DIR}/[0-9][0-9]*) ] ; then
|
||
|
FILES="${FILES} $(ls ${DIR}/[0-9][0-9]*)"
|
||
|
fi
|
||
|
fi
|
||
|
done
|
||
|
FILESSORTED="$(echo ${FILES} | sort)"
|
||
|
|
||
|
for FILE in ${FILESSORTED} ; do
|
||
|
echo ${FILE} || exit $?
|
||
|
done
|
||
|
exit 0
|