Question: I'd been trying to run the following script, but failed. Please help me with this part. I am not sure what is wrong. I am

I'd been trying to run the following script, but failed. Please help me with this part. I am not sure what is wrong. I am working on Linux Ubuntu 18.04.

Please provide the screenshot and explanation. I promise to give you thumb up.

in NANO file:

#!/bin/bash

echo "Enter full path to search files : "

read path

find $path -iregex '.*\.\(jpg\||png\|txt\)$' -print 2>/dev/null > temp.txt

a=`wc -l < temp.txt`

echo "Total files: " $a

cat temp.txt

rm temp.txt

In LINUX UBUNTU TERMINAL, I run the following command:

gedit mytext.sh

Response:

-bash: /usr/bin/gedit: No such file or directory

I installed it, but the response still the same.

Then I tried to run the following command:

bash mytext.sh

Responses are:

mytext.sh: line 5: unexpected EOF while looking for matching ' ' '

mytext.sh: line 9: syntax error: unexpected end of file.

Appreciate your help solving this problem.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!