• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
grep 2.7 & linked-images
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

grep 2.7 & linked-images


  • Subject: grep 2.7 & linked-images
  • From: Christopher Stone <email@hidden>
  • Date: Sun, 2 Jan 2011 04:27:04 -0600

Hey Folks,

This morning I got irked enough by the fact that 10.6.5's grep's 'ignore-case' flag breaks when the 'only-matching' flag is used to go looking for a solution.  The solution was MacPorts and the most recent version of 'grep' 2.7.

The built-in in Snow Leopard is "grep (GNU grep) 2.5.1.

With 2.7 this works properly:

# Grab linked-images
set yourURL to quoted form of "http://members.aceweb.com/randsautos/photogallery/ferrari/enzo/"
set cmdStr to "curl -L --user-agent 'Opera/9.70 (Linux ppc64 ; U; en) Presto/2.2.1' " & yourURL & " | /opt/local/bin/egrep --ignore-case --only-matching \"<a href[^>]+\\.jpg[^>]*>\""
do shell script cmdStr

--
Chris
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: grep 2.7 & linked-images
      • From: Skeeve <email@hidden>
    • Re: grep 2.7 & linked-images
      • From: Axel Luttgens <email@hidden>
  • Prev by Date: Re: Accessing/creating mailboxes in Mail.app
  • Next by Date: Re: Accessing/creating mailboxes in Mail.app
  • Previous by thread: Re: Accessing/creating mailboxes in Mail.app
  • Next by thread: Re: grep 2.7 & linked-images
  • Index(es):
    • Date
    • Thread