I thank all you guys!
everything's working as needed.. if i get a few spare cycles i'll run a few tests to see what the time/diff would be between a few of the posts..On Tue, Sep 13, 2016 at 12:32 PM, Boris Epstein <borepstein@xxxxxxxxx> wrote:
Good points. I wonder if it wouldn't be best to do it all in awk. Saves CPU cycles and complexity, IMHO.Cheers,Boris.On Tue, Sep 13, 2016 at 12:26 PM, Gordon Messmer <gordon.messmer@xxxxxxxxx> wrote:On 09/12/2016 04:37 PM, bruce wrote:
awk -F': ' '{print $2}' | tail -1 | sed 's/.*storeId=\(.*\).&/\1/'
You've got good answers, especially Cameron's. It had one error, though. If the URL is in a variable, it needs to be an argument to printf:
url="" href="http://venturacollege.bncollege.com/webapp/wcs/stores/servlet/BNCBHomePage?storeId=78236&campusId=78236&userId=-1002&catalogId=10001&ddkey=http:BNCBMultiCampusPageCmd" rel="noreferrer" target="_blank">http://venturacollege.bncollege.com/webapp/wcs/stores/ The reason I like Cameron's advice in particular is that it doesn't use ".*". In this case, performance isn't measurably bad, but using ".*" can eat a lot of CPU cycles.servlet/BNCBHomePage?storeId=7 8236&campusId=78236&userId=-10 02&catalogId=10001&ddkey=http: BNCBMultiCampusPageCmd'
store_id=$( printf '%s\n' | tr '?&' '\012\012' | sed -n 's/^storeId=//p' )
https://blog.mariusschulz.com/2014/06/03/why-using-in-regula r-expressions-is-almost-never- what-you-actually-want
--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://lists.fedoraproject.org/admin/lists/users@xxxxxxxxxx raproject.org
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://lists.fedoraproject.org/admin/lists/users@lists. fedoraproject.org
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
-- users mailing list users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe or change subscription options: https://lists.fedoraproject.org/admin/lists/users@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org