#!/bin/bash
set -e -u -x

grep --ignore-case --only-matching --no-filename '<img[^/]*src=\"[^">]*"' *.opt \
  | sed 's/<img.*src="//g' \
  | sed 's/"$//g' \
  | sort -u \
  > $1

#!/bin/bash
set -e -u -x

grep --ignore-case --only-matching --no-filename '<img[^/]*src=\"[^">]*"' -r --include=*.opt . \
  | sed 's/<img.*src="//g' \
  | sed 's/"$//g' \
  | sort -u \
  > $1

Fix image extraction when there are too many files in a directory.
[guide] Fix image extraction when there are too many files in a directory.
