Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
OK Bash was lying, it was the ";" after the "continue" cmd that it was barfing about and now it is just barfing about the "done" line, but really thinking the error is in one of the 2 lines before "done"!
OK Bash was lying, it was the ";" after the "continue" cmd
No, again no. bash is not lying, just you use incorrect syntax again and was not understood.
As it was already suggested please use shellcheck:
Code:
Line 5:
if {grep -i '/etc/' <<< $nfil} then; continue; fi
^-- SC1009: The mentioned syntax error was in this if expression.
^-- SC1073: Couldn't parse this brace group. Fix to allow more checks.
^-- SC1054: You need a space after the '{'.
^-- SC1083: This } is literal. Check expression (missing ;/\n?) or quote it.
^-- SC1010: Use semicolon or linefeed before 'then' (or quote to make it literal).
^-- SC1056: Expected a '}'. If you have one, try a ; or \n in front of it.
^-- SC1072: Unexpected keyword/token. Fix any mentioned problems and try again.
You have to know the language if you want to use it. Bash (and the computer in general) cannot lie, will just try understand the text file you wrote.
When you brake the rules [of the language] the computer will try the best (and guess), but obviously has no chance to know what was the initial wish.....
So again: if you think bash is lying you ought to check which rule did you ignore.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.