#!/bin/bash for a in $(seq 0 $(($(ls html/cns/policy/*.txt | wc -l) - 1))); do echo $a php int.php $a | grep 'Codice fiscale:' done