From c44aa486114665209d233433a67d5770c60b65e1 Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Tue, 3 Jun 2025 19:15:40 -0400 Subject: [PATCH] Fix for movestat with files-with-dots --- CHANGELOG.md | 2 ++ plots/movestat | 9 +++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1edcc23..4351598 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Update `movestat` to extract seasons in files with dots in the name + ### Removed ### Deprecated diff --git a/plots/movestat b/plots/movestat index 68bf1c9..8311fdc 100755 --- a/plots/movestat +++ b/plots/movestat @@ -172,8 +172,7 @@ echo " " cd $pltdir/corcmp if( $season == 'NULL' ) then set files = `/bin/ls -1 *stats*gif` - set fname = `echo $files[1] | cut -d. -f1` - set season = `echo $fname | sed 's/.*_//g'` + set season = `echo $files[1] | sed 's/.*_\([^_][^_]*\)\.[^.][^.]*$/\1/'` endif ssh $webid@${server} mkdir -p ${www}/${webdir}/${season}/corcmp echo Syncing ${season} Files from $pltdir/corcmp to $webid@${server}:${www}/${webdir}/${season}/corcmp @@ -187,8 +186,7 @@ echo " " cd $pltdir/$DSC if( $season == 'NULL' ) then set files = `/bin/ls -1 *stats*gif` - set fname = `echo $files[1] | cut -d. -f1` - set season = `echo $fname | sed 's/.*_//g'` + set season = `echo $files[1] | sed 's/.*_\([^_][^_]*\)\.[^.][^.]*$/\1/'` endif ssh $webid@${server} mkdir -p ${www}/${webdir}/${season}/$DSC echo Syncing ${season} Files from $pltdir/$DSC to $webid@${server}:${www}/${webdir}/${season}/$DSC @@ -205,8 +203,7 @@ echo " " cd $pltdir/$DSCS[1].$DSC if( $season == 'NULL' ) then set files = `/bin/ls -1 *stats*gif` - set fname = `echo $files[1] | cut -d. -f1` - set season = `echo $fname | sed 's/.*_//g'` + set season = `echo $files[1] | sed 's/.*_\([^_][^_]*\)\.[^.][^.]*$/\1/'` endif ssh $webid@${server} mkdir -p ${www}/${webdir}/${season}/$DSCS[1].$DSC