aboutsummaryrefslogtreecommitdiff
path: root/workout
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2021-06-30 19:30:06 +0000
committerrodri <rgl@antares-labs.eu>2021-06-30 19:30:06 +0000
commit3f2f92a1f48783f10692ae2defaf57585805b704 (patch)
tree59bd4e6e021ac032047b6e0ad37b813b6f5ce3ba /workout
parent3d91cb5bef0305ac05d3a172aecb0d60a5a2c500 (diff)
downloadrcfitness-3f2f92a1f48783f10692ae2defaf57585805b704.tar.gz
rcfitness-3f2f92a1f48783f10692ae2defaf57585805b704.tar.bz2
rcfitness-3f2f92a1f48783f10692ae2defaf57585805b704.zip
workout: ignore shell-style comments from input when adding reps per exercise.
default.session: updated program. exercises: some corrections and new stuff. added new scripts to register age, height, Δweight/dt, BSA and SBSI (the latter too technical to be useful for me but were fun rc practice.)
Diffstat (limited to 'workout')
-rwxr-xr-xworkout5
1 files changed, 5 insertions, 0 deletions
diff --git a/workout b/workout
index 78a2bee..d574c49 100755
--- a/workout
+++ b/workout
@@ -15,6 +15,10 @@ fn isnumber{
! ~ `{echo $1 | awk '/^[0-9]+$/'} ''
}
+fn sanitize{
+ echo $1 | sed 's/[ ]#.*//g'
+}
+
fn printexers{
for(i in `{seq 1 $#exercises})
echo $i':' $exercises($i)
@@ -67,6 +71,7 @@ fn setupreps{
while(! isnumber $r){
echo -n how many reps for $exercises($session($i))?' '
r=`{read}
+ r=`{sanitize $r}
}
reps=($reps $r)
}