#! /bin/bash
#------------------------------------------------------------------------------
#$Author: saulius $
#$Date: 2018-10-11 17:54:42 +0000 (Thu, 11 Oct 2018) $
#$Revision: 5120 $
#$URL: file:///home/saulius/svn-repositories/paskaitos/VU/software/assignment-evaluation/trunk/scripts/do-check-BPKM-1st-kmer--shell-commands $
#------------------------------------------------------------------------------
#*
# Check if the requied shell commands were called.
#**

set -ue
## set -x

DIRECTORY="$1"

ID='$Id: do-check-BPKM-1st-kmer--shell-commands 5120 2018-10-11 17:54:42Z saulius $'

cd "${DIRECTORY}"

for CMD in \
    'curl|wget' \
    'sort' \
    'uniq' \
    'grep' \
    'grep -v' \
    'chmod' \
    'echo' \
    'touch' \
    'set -x' \
    'history' \
    'mkdir' \
    'sh -x' \
    'cd' \
    'ls' \
    #
do

if [ $(find -type f \! -perm /111 -exec grep -wP "$CMD" {} \; | wc -l) -eq 0 ]
then

cat <<EOF
-- [AUTO;INTERFACE;$(echo $ID | sed 's/\$//g')]
   Nepanaudojote komandos '$CMD' (-5 balai)

EOF

fi

done
