I am having 5 types of files in same dirctory.then i want to split all the files in the same directory and i need to give the splitted file name as dynamic(original file name + additional extexnsion). File names like(K_MOSTLY*,L_MOSTLY*,M_MOSTLY*,IPBAR*).But i was able to split first matching files only not split second matching files.
for entry in /path/ ;
do
split -b 700K K_MOSTLY* -d --additional-suffix K_MOSTLY*
split -b 700K L_MOSTLY* -d --additional-suffix L_MOSTLY*
split -b 700K M_MOSTLY* -d --additional-suffix M_MOSTLY*
split -l22000 IPBAR -d --additional-suffix IPBARCODES*
rm K_MOSTLY*
rm L_MOSTLY*
rm M_MOSTLY*
rm IPBARCODES*
done