[SOLVED] how can I ignore or remove lines with 2 or more identical numbers in the same line?
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.
Yes, we have perl 5 and perl 6 and python 2 and python 3. If you want to use the full power of these languages you need to learn a lot. Not only about regexp, but other constructs, language elements too.
Theoretically one of them is enough, because you can do anything you want (yes, with anyone of them), but they are quite different. If you are interested you can try both (perl and python).
I also suspect, but don't fully have the skill to assess, that perl has been put together better from a CS standpoint.
I've started using perl recently for a small project at work; one thing I keep banging into is the refs vs value thing. IMO, this is pretty big wart in the data model. That plus the auto-conversion to string all over the place gives the feeling it's not well put together at all.
Python avoids those problems, but it misses a variable declaration syntax (you have to use assignment instead) which results in some weirdness around scoping of variables. I think a newbie is less likely to run into that than the the perl problems though.
I've started using perl recently for a small project at work; one thing I keep banging into is the refs vs value thing. IMO, this is pretty big wart in the data model. That plus the auto-conversion to string all over the place gives the feeling it's not well put together at all.
Python avoids those problems, but it misses a variable declaration syntax (you have to use assignment instead) which results in some weirdness around scoping of variables. I think a newbie is less likely to run into that than the the perl problems though.
Both (perl and python) are relatively complex and you will not be able to write good code without understanding how it works. perl is coming from the c/awk/shell world, so you will better understand if you knew c already (for example). Python will have definitely different issues, but again if you want to make really efficient code you need to know all of their whims.
I've started using perl recently for a small project at work; one thing I keep banging into is the refs vs value thing. IMO, this is pretty big wart in the data model. That plus the auto-conversion to string all over the place gives the feeling it's not well put together at all.
When in doubt use Data::Dumper module
Last edited by keefaz; 01-20-2018 at 03:07 PM.
Reason: Disable smilies in text
I think I will concentrate on learning more about regex. I was watching some tutorials on perl and python and as always the basics are easy but it gets more complex as you progress into the lessons.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.