-#!/bin/bash
+#!/usr/bin/env bash
# counts up the files in each maildir 'cur' folder to find out how many messages are
# held in each subdirectory.
find . -name "cur" >$folderlist
-while read line; do echo -n "$line -- " ; find "$line" -type f | wc -l ; done < $folderlist
+while read input_text; do echo -n "$input_text -- " ; find "$input_text" -type f | wc -l ; done < $folderlist
popd &>/dev/null