Hi Everyone, I have an sh script that I am working on and I have run into a little snag that I am hoping someone here can assist me with.
I am using wget to retrieve an xml file from thetvdb.com. This part works ok but what I need to be able to do is extract the series ID # from the xml and put the number into a variable for further use in my script.
The number in <seriesid>73545</seriesid> is what I am interested in and
in this case I need "73545" extracted and placed into a variable.
How can I accomplish this. I have been able to print out the entire line using grep so it looks like this. But I need just the number.
<seriesid>73545</seriesid>
I haven't been able to figure out sed or awk enough to make this happen. Help?
Ok so I'm not sure why but this worked just fine on a mac os x machine but when I used the exact same thing on a linux box it just gives me a blank output, i duplicated everything exactly.
Hey danmero this works really well thanks! I played around with it and it only takes the SeriesID if the SeriesName matches. Very cool
Is there any way to modify this so it isn't case sensitve? I have a little trouble with show names such as NCIS or ER or other abbreviated titles that may or may not be in caps.