#!/bin/bash for i in {0..100}; do echo ${i} while read x ; do echo ${x} done < <(find /usr/lib -type f ! -type l -name '*.a') done