the \"bookrecords\" directory has multiple files
bookrecords 1.txt 2.txt 3.txt .....
file 2.txt has the c
with awk
awk
$ awk -v search_string="$name" '$0~search_string{print FILENAME; exit}' bookrecords/*
however, I think grep is better if you're not structurally searching
grep
$ grep -lF "$name" bookrecords/*