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.
I am trying to extract the itemTitle of an ebay item from the html page that I have saved and use it in another part of a script.
I have come as far as:
cat ebayISAPI.dll\......html | grep class\=\"itemTitle\"\> which give me the block of text with 1 instance of the phrase itemTitle that I want to use ....
but can't seem to get the | sed -n '/itemTitle/,/h1/p' to work at all depite going almost blind reading the man pages and examples that I have found.
I am going along the right lines I think but confirmation would be good so I can continue my research would be helpful.
The intention is to them rename the html file to the title of the item which I think I have sussed.
A little research has revealed that the sed -n '/itemTitle/,/h1/p' is working in that it prints the whole line that includes the start expression. So it is doing the same as grep class\=\"itemTitle\"\>. Pointers to gets getting the text between the start and end expressions?
It is just the bold part, obviously changes with each new file, that I want to be able to use to rename the same file in another script that I found on this web site. Awesome resource don't you think!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.