Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Correct ... as we are not here to do the work for you but rather assist you with being stuck. This is trivial problem which you could have solved by simply searching for
a sed tutorial.
Well actually its kinda hard for a beginner, but the point Grail is making is you should atleast put in some effort, then you'll find others more willing to help.
I tried doing it and found this works best(it took alot a reading an research lol, but glad I have alot a more useful knowledge now
Another point is that you need to explain your true goal more explicitly. Do you just need to match the exact string "Hello"? Do you need to match whatever is between the quote-marks on the line (and can there be more than one set of quotes)? Do you want the last word on the line, minus any quotes? Or what?
That's the real trick to regular expressions. You must first clearly define what differentiates the part you want to match from the parts you don't want. Only then you can structure your expression accordingly.
Regex is one of the most useful tools you can learn in all computer use. It's well worth putting in some time to study them. Here are a couple of tutorials to start you with:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.