i have a folder full of nc files from 1979 to 2018 daily data. i wish to combine it all to one nc but when i tried to list the files to create a ferret script, the order was changed.i am giving below a sample of the names of my data files.

```
ERA5_2018_9_12_UVP.nc
ERA5_2018_9_13_UVP.nc
ERA5_2018_9_14_UVP.nc
ERA5_2018_9_15_UVP.nc
ERA5_2018_9_16_UVP.nc
ERA5_2018_9_17_UVP.nc
ERA5_2018_9_18_UVP.nc
ERA5_2018_9_19_UVP.nc
ERA5_2018_9_1_UVP.nc
ERA5_2018_9_20_UVP.nc
ERA5_2018_9_21_UVP.nc
ERA5_2018_9_22_UVP.nc
ERA5_2018_9_23_UVP.nc
ERA5_2018_9_24_UVP.nc
```

the dates are changing when i list them i tried a code in shell script to change the name of the files using ```sed``` command.
```
ls *.nc >temp
	for i in {1..9..1}
	do
	sed "s/_${i}_UVP/_0${i}_/g"
	done < temp
```
can anyone help me in this regard?