Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Running Fedora 21 on my VM. I am receiving "Syntax error:unexpected end of file " upon bash script execution. enter image description here

enter image description here

There is no line 35 in my script. why am I getting the error?

share|improve this question

closed as off-topic by dhag, G-Man, slm Jun 15 at 4:00

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – dhag, G-Man, slm
If this question can be reworded to fit the rules in the help center, please edit the question.

    
You missed the last } for function definition. –  cuonglm Jun 15 at 1:59

2 Answers 2

up vote 1 down vote accepted

You missed the } that ends your test_file function :

test_file() {
   ....
}
share|improve this answer
    
Oh... yeah right. feel so dumb now. –  Coffeenator Jun 15 at 2:03

You need to close the function declaration by putting a } at the end.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.