Scripting / one liner help
p.echols at comcast.net
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 comcast.net>:
>> 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