ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
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.
Hi guys,
This is a weird question. I'm not sure if it can be done or not.
Here is the thing. I have a file with several parentheses, both () and []. All of them should be closed, but apparently, one of them is open. In order to run a program, I need all of them to be closed...
For example, if I write: ((bla (bla (bla)) I would have two parentheses missing. That's what I mean.
But I have several parentheses in the file... it would take me ages to do it manually. Is there a way to check which parenthesis is open? can it be done?
Thanks!!
I see you use Windows so you could use Notepad++ which has some great plugins to search for matching braces/brackets and so on (TextFX Quick). Also when you select a language, for example Perl or Shell, then the parentheses get highlighted in a different color if not matched which improves visibility very much.
Since Notepad++ is a derivative of SciTe, I imagine that would have similar behavior. I'm not 100% sure but maybe Emacs also has this behavior/function.
Thanks for your quick reply! I'm using Windows but I have access to a linux server, so I can work there too. I've tried the Notepad++ and it highlighted all the parentheses, I cannot find the one that it's not closed. Any other option?
Well colucix, I'd wish it tells me! it only says "Error reading tree file: Missing closing ')' in tree" grrr
It's a pain in the neck because it's a result from another program...
But, you gave me an idea... you didn't mean it, but it made me think I could try another program to open it... and now I can open it. It seem the other program had a problem with the file :S there were none missing parenthesis! :S
Thanks anyways!!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.