Skip to content

Commit

Permalink
Update payu_config/archive_scripts/standardise_mom6_filenames.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
minghangli-uni authored Sep 10, 2024
1 parent d53e923 commit 7587496
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion payu_config/archive_scripts/standardise_mom6_filenames.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ for dir in ${out_dirs[@]}; do
# process each mom6 file
for current_file in $dir/access-om3.mom6.*.nc; do
if [ -f $current_file ]; then
new_filename=$(echo $current_file | sed -E 's/_([0-9]{4})\./\1./')
new_filename=$(echo $current_file | sed -E 's/_([0-9]{4})/\1/')
# rename the file without overwriting existing files
mv -n $current_file $new_filename
fi
Expand Down

0 comments on commit 7587496

Please sign in to comment.