I have a gzip file
ABC_000023232.gzip
BCD_023232032.gzip
I want to split these files into smaller files but keep the extension same because I am using this as a variable in a script
Code:
for i in `ls *.gzip`
split -b 500K $i $i
done
This produces
Code:
ABC_000023232.gzipaa
ABC_000023232.gzipab
ABC_000023232.gzipac
BCD_023232032.gzipaa
BCD_023232032.gzipac
I want
Code:
ABC_000023232aa.gzip
ABC_000023232ab.gzip
ABC_000023232ac.gzip
BCD_023232032aa.gzip
BCD_023232032ab.gzip