Kindly help me to run following program in moodle.
# first i made file in shell prompt
cat > fun
then i write shell script
cat fun | grep "def" fun > file1
#grep "def" fun > file1
cat file1 | head -n1 | cut -d " " -f1 >file2
# content=$(cat file2)
#--- remove multiple spaces ---
cat file2 | sed 's/ */ /g' > dummy
echo "content" $content
if [ "$s" == "$content" ]
echo "with function"
echo "without function"
This program perfectly run in shell prompt
but when i try to execute this program in moodle it is not working.
Actually i want that my shell script program check function available in python program or not.
and i want that student get grade automatic if student write program by function.
When i write above program in evaluate.sh file then it shows command not found error cat, grep so on.
kindly help me to execute above program in moodle.