I have a genotype file which I have split it into more than 2000 5K SNPs files by using split -d geno_filethe output that I get is something like this:table_subset_0001table_subset_0002table_subset_0003..table_subset_0099..table_subset_0999I want to delete 0 and get table_subset_1table_subset_2table_subset_3..table_subset_93..table_subset_999Is there any way to do that?
Remove a specific suffix from all the files in a directory
files;rename
To add on to @John1024's solution, here's a similar one that uses standard Bash commands:for file in table_subset_*; do    new_name=$(echo $file | sed -E -e 's/_0+/_/')    mv $file $new_namedoneThe principle is the same. We iterate over all files and replace the _0 with _.