Skip to main content
2 of 3
added 76 characters in body; added 1 characters in body
cobbal
  • 70.5k
  • 20
  • 144
  • 157

Not possible in just grep I believe

for sed:

name=`echo $f | sed -E 's/[0-9]+_([a-z]+)_[0-9a-z]*/\1/'`

I'll take a stab at the bonus though:

echo "$name.jpg"
cobbal
  • 70.5k
  • 20
  • 144
  • 157