- grep -iE "$(STRING "${SEARCH}")" "$_DATA/$ITEM/$meta" \
- | cut -f1,6- \
- | while f="$(line)"; do
- fn="$(UNSTRING "${f#* }")"; fn="${fn%${CR}}";
- file="$(printf '%s\n' "$_DATA/$ITEM/$base/${fn}".*)"
- file="${file##*/}"
- [ -e "$_DATA/$ITEM/$base/${file}" ] \
- && printf '%s %s\n' "${f%% *}" "${base}/${file}"
- done
+ if [ $ORDER = Name ]; then
+ sort -k6 "$meta"
+ elif [ $ORDER = Length ]; then
+ sort -n -k1 "$meta"
+ else
+ cat "$meta"
+ fi \
+ | if [ "$FILTER" ]; then
+ sed -nr "$list_fex"
+ elif [ "${SEARCH#!}" != "${SEARCH}" ]; then
+ grep -aviE "$(STRING "${SEARCH#!}" |sed -r ':x s;((^|[^\\])(\\\\)*)\+;\1\\+;g; tx;')"
+ else
+ grep -aiE "$(STRING "${SEARCH}" \
+ | sed -r ':x s;((^|[^\\])(\\\\)*)\+;\1 ;g; tx;
+ s;((^|[^\\])(\\\\)*)\\\+;\1+;g;
+ s; ;\\+;g;')"
+ fi |cut -f6 | UNSTRING \
+ | while read -r fn; do
+ printf '%s\n' "${base}/${fn%${CR}}"
+ done | tee .index/debug