Bash script syntax error

Felix Bakhman
Felix Bakhman used Ask the Experts™
Hello Experts. I am studying Pen-testing and the current assignment is to write a script for data cleanup using vi.
I am experiencing a syntax error that i am having a hard time with
Please see the attached screenshot.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2013
Top Expert 2013
You're missing the mandatory "fi" statement to terminate the "if" construct.

Put it in a line of its own after "find".

Besides that, if you want "UNAME" to contain the result of the "uname" command you should write


i. e. backticks (grave accents) instead of single quotation marks, or better



I used UNAME=$(uname)

Thank you so much for your expertise

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial