From 19c7882be4aa540a02e5b536c2bbbbaaa52f6c04 Mon Sep 17 00:00:00 2001 From: Christos Angelopoulos Date: Mon, 4 Apr 2022 00:00:08 +0300 Subject: [PATCH] improve duration definition --- Sapo.sh | 2 +- sapo-fix.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Sapo.sh b/Sapo.sh index 59db381..8c6da20 100755 --- a/Sapo.sh +++ b/Sapo.sh @@ -241,7 +241,7 @@ do killall mplayer;mplayer "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV & fi BROWSE_NEXT=false - DURATION=$(sox "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV -n stat 2>&1 |grep "Length"|sed 's/^.*\: *//') + DURATION=$(sox "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV -n stat 2>&1 |grep "Length"|sed 's/^.*\: *//;s/....$//') yad --image "$HOME/git/sapo/sapo.png" \ --height=40 --width=400 \ --title="Line $ERROR_TEXT_LINE ( of $TOTAL_ERRORS )- $NAME" \ diff --git a/sapo-fix.sh b/sapo-fix.sh index 72b2e4e..4d17f34 100755 --- a/sapo-fix.sh +++ b/sapo-fix.sh @@ -71,7 +71,7 @@ do killall mplayer;mplayer "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV & fi BROWSE_NEXT=false - DURATION=$(sox "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV -n stat 2>&1 |grep "Length"|sed 's/^.*\: *//') + DURATION=$(sox "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV -n stat 2>&1 |grep "Length"|sed 's/^.*\: *//;s/....$//') yad --image "$HOME/git/sapo/sapo.png" \ --height=40 --width=400 \ --title="Line $ERROR_TEXT_LINE ( of $TOTAL_ERRORS )- $NAME" \