exit 1
fi
+if [[ $(which ionice) ]]; then
+ IONICE="ionice -c3"
+else
+ IONICE=""
+fi
+
HEADER_ONLY="-H"
while [[ $1 ]]; do
HEADER_ONLY=""
;;
+ "--intense")
+ IONICE=""
+ ;;
+
"--keepspam")
KEEP_SPAM=1
;;
if [[ ${KEEP_SPAM} ]]; then
- cat ${FILE_PATTERN} \
+ ${IONICE} cat ${FILE_PATTERN} \
| pv -s ${SIZE} -p -t -e - \
| mboxgrep ${HEADER_ONLY} -i "${RE_PREFIX}${PATTERN}" > ${RESULT_MBOX}
else
- cat ${FILE_PATTERN} \
+ ${IONICE} cat ${FILE_PATTERN} \
| pv -s ${SIZE} -p -t -e - \
| mboxgrep ${HEADER_ONLY} -i "${RE_PREFIX}${PATTERN}" \
| mboxgrep ${HEADER_ONLY} -v '^Subject:.*SPAM' > ${RESULT_MBOX}