Scripting / one liner help
Johnny Rosenberg
gurus.knugum at gmail.com
Fri Aug 12 11:45:29 UTC 2011
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… :)
Kind regards
Johnny Rosenberg
ジョニー・ローゼンバーグ
More information about the ubuntu-users
mailing list