Re: bash/regex question..

2016-09-13 Thread cs
On 13Sep2016 14:27, bruce wrote: I'm doing 100s/1000s of these.. Still a smallish number. but.. the othe parts of th operation are longer/more compute expensive.. this is essentially noise in the scheme of things.. and i'm fairly certain the resource usage is a wash as well for the diff appr

Re: bash/regex question..

2016-09-13 Thread bruce
Hey Gordon. I'm doing 100s/1000s of these.. but.. the othe parts of th operation are longer/more compute expensive.. this is essentially noise in the scheme of things.. and i'm fairly certain the resource usage is a wash as well for the diff approaches On Tue, Sep 13, 2016 at 1:19 PM, Gordon Me

Re: bash/regex question..

2016-09-13 Thread Gordon Messmer
On 09/13/2016 09:54 AM, bruce wrote: 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.. Your use case is small enough that it might be difficult to illustrate the potential problems. The question

Re: bash/regex question..

2016-09-13 Thread bruce
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.. thanks (hopefully the answers will help others in the future.!) On Tue, Sep 13, 2016 at 12:32 PM, Boris Epstein wrote: > Goo

Re: bash/regex question..

2016-09-13 Thread Boris Epstein
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 wrote: > On 09/12/2016 04:37 PM, bruce wrote: > >> awk -F': ' '{print $2}' | tail -1 | sed 's/.*storeId=\(.*\).&/\1/' >> > >

Re: bash/regex question..

2016-09-13 Thread Gordon Messmer
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='http://venturacollege.bncollege.com/w

Re: bash/regex question..

2016-09-13 Thread Lorenzo Sutton
On 13/09/2016 01:37, bruce wrote: Hey. Simple question. Got a basic string.. http://venturacollege.bncollege.com/webapp/wcs/stores/servlet/BNCBHomePage?storeId=78236&campusId=78236&userId=-1002&catalogId=10001&ddkey=http:BNCBMultiCampusPageCmd trying to get the internal sub-string "78236"

Re: bash/regex question..

2016-09-12 Thread cs
On 12Sep2016 19:37, bruce wrote: Simple question. Got a basic string.. http://venturacollege.bncollege.com/webapp/wcs/stores/servlet/BNCBHomePage?storeId=78236&campusId=78236&userId=-1002&catalogId=10001&ddkey=http:BNCBMultiCampusPageCmd trying to get the internal sub-string "78236" I can rem

Re: bash/regex question..

2016-09-12 Thread Christopher
On Mon, Sep 12, 2016 at 7:38 PM bruce wrote: > Hey. > > Simple question. > > Got a basic string.. > > http://venturacollege.bncollege.com/webapp/wcs/stores/servlet/BNCBHomePage?storeId=78236&campusId=78236&userId=-1002&catalogId=10001&ddkey=http:BNCBMultiCampusPageCmd > > trying to get the intern

Re: bash/regex question..

2016-09-12 Thread Clifford Snow
On Mon, Sep 12, 2016 at 4:37 PM, bruce wrote: > 's/.*storeId=\(.*\).&/\1/' simple solution sed -e 's/.*storeId=\(.*\).&/\1/' -e 's/\&.*//' Clifford -- @osm_seattle osm_seattle.snowandsnow.us OpenStreetMap: Maps with a human touch -- users mailing list users@lists.fedoraproject.org To unsu