Skip to content

Instantly share code, notes, and snippets.

@sakunyo
Created May 9, 2012 10:04
Show Gist options
  • Save sakunyo/2643507 to your computer and use it in GitHub Desktop.
Save sakunyo/2643507 to your computer and use it in GitHub Desktop.
grep images
ls
hoge.jpg
figure.png
bar.png
title.png
ls | grep 'jpg\|png' | sed -e 's/^/<img src="images\//' -e 's/$/" alt="" \/>/'
<img src="images/hoge.jpg" alt="" />
<img src="images/figure.png" alt="" />
<img src="images/bar.png" alt="" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment