I have a process creating the following files, which share a similar pattern.file_1.txtfile_2.txt...file_1000.txt...file_1901.txtfile_1902.txtBut, there are only 1890 files in the folder. I would like to know if there is a way to identify the missing files from the list of files sharing a pattern.
identify missing files in a folder
files;regular expression;filenames
#!/bin/bashfor i in {1..2000}do    file_name=file_${i}.txt    if [ ! -f ${file_name} ]    then        echo ${file_name} not exists..    fidonefor i in {1..2000};do file_name=file_${i}.txt; [ -f ${file_name} ] || echo ${file_name} not exists; done