You can use the command seq, but if you want to specify the number of digits, use the -f option. "Seq -f% 0 digits first number last number" Anyway. Don't forget to write 0 ...
#!/bin/bash
for NUMPATH in `seq -f %05g 1 96`
do
echo "flow_z${NUMPATH}_0000950000"
done
The execution result is as follows
rm flow_z00081_0000010000
(abridgement)
rm flow_z00095_0000950000
rm flow_z00096_0000950000
If you want to delete a serial number file, but the wildcard exceeds the limit, you can not write it well, and it is difficult to use a regular expression, you can handle it with the above code.
Recommended Posts