Quote:
Originally Posted by
fahdmirza
Hi Scrutinizer, thanks for the reply. Pardon my ignorance, but I have little confusion.
For example take the following line from the data:
<outline title="Matt Cutts" type="rss" version="RSS" xmlUrl="http://www.mattcutts.com/blog/feed/" htmlUrl="http://www.mattcutts.com/blog"/>
Now first your code makes the above full line (or record) as one field by doing RS=FS.
Then it matches the start of xmlUrl in above line, and now the field separater is ".
My question is how $2 contains the required url. Please explain.
Thanks.
It is the other way around; it takes the fields in the line and turns every field into a record....
Then it matches the records that start with
xmlUrl
If the separator is
" then there are three fields in the record that we are looking for:
$1 contains the part to the left of the first double quote,
xmlUrl=
$2 contains the url and
$3 contains the part to the right of the second double quote, which is an empty string...
Does that answer you question?