Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Step 1: Create a new file named as checkError.sh (vi checkError.sh or nano check

ID: 3827904 • Letter: S

Question

Step 1: Create a new file named as checkError.sh (vi checkError.sh or nano check Error sh), then include following lines in your checkError.sh. #/bin/bash /*m check Error Script echo Try to find out some errors Seach for the words which can be matched by regex al ce And save the output to file Result echo The regex al ce can match the string (s) Result grep al ces' END Result lance aCe brace decide piece ENDHERE Check the existence of file Result Send the content in Result to your emailbox 1 is replaced by your CampuSID ls mail $1 Result $1 is replaced by your campusdD echo "The result has been sent to $11 Student gSu.edu echom Congratulations You have corrected all the errors! Or you can directly copy this file from my public directory to your current working directory by following command and then skip step 2

Explanation / Answer

Correct script:

#!/bin/bash

#Check Error Script

echo "Try to find out some errors!!!"

echo "The regex [^a]*ce can match the string(s):"> Result
grep '^[^a]*ce$' << END >> Result

lance
ace
brace
decide
piece
-ENDHERE

ls mail $1 < Result

echo "The result has been sent to $1@student.gsu.edu"
echo "Congratulations! You have corrected all the errors!"

t

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote