Scripting / one liner help
hal at burgiss.net
Thu Aug 11 01:30:56 UTC 2011
On Wed, Aug 10, 2011 at 7:58 PM, Patton Echols <p.echols at comcast.net> wrote:
> On 08/10/2011 02:52 PM, Hal Burgiss wrote:
>> On Wed, Aug 10, 2011 at 3:00 PM, Johnny Rosenberg <gurus.knugum at gmail.com<mailto:
>> gurus.knugum at gmail.com**>> wrote:
>> 2011/8/10 Hal Burgiss <hal at burgiss.net <mailto:hal at burgiss.net>>:
>> > See if this gets close to extracting the image names ...
>> > grep SRC *html | sed -r 's/SRC="([^"]+)"/\1/ig' | whatever_script.sh
>> I didn't create this thread, but can you please explain that sed
>> statement? I don't get it… (I'm not a beginner with regular
>> expressions but I'm definitely not an expert either…)
>> Thanks for the explanation Hal, unfortunately it is not doing the "ignores
> the rest" part It appears that it finds each occurrance of a file name, then
> replaces it with the same occurrance, without the " marks.
Sorry something got left out, try ...
grep SRC *html | sed -r 's/.*SRC="([^"]+)".*/\1/ig'
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ubuntu-users