#!/bin/bash while read -r dir do count=$(($count + 1)) done < all_files