1. Business scenario: The data format we need is xxx.zip, and the data format given to us by the actual data provider is xxx_000000.zip. There are hundreds of such files or even the previous one. Manual modification may be unrealistic. , Scripting is a good choice
Several pieces of simulated data
. Script case written by me
#!/bin/bash
for file in `ls | grep .zip`
do
newfile=`echo $file | sed 's/_000000//g'`
mv $file $newfile
done
The data format after executing the script processing is as follows