Scripting / one liner help

Patton Echols p.echols at
Fri Aug 12 14:15:18 UTC 2011

On 08/12/2011 04:45 AM, Johnny Rosenberg wrote:
> 2011/8/11 Patton Echols<p.echols at>:
>> Using the grep statement suggested by Johnny:
>> grep -io "<img[^>]\+>"
>> solves it because grep is spitting out each match, not the entire line.
> Which Johnny was that? I can't see that suggestion in this
> conversation, however Jordon suggested:
> grep -iPo "<img[^>]+>" file.html | \
>   sed -n 's/<img src=['\''"]\([^"'\'']*\).*/\1/pgI'
> I only asked about another suggestion, I didn't suggest anything
> myself. Don't want to take credit for other people's work… :)

Oops, I meant Jordan, Sorry to you and especially Jordan.

More information about the ubuntu-users mailing list