From 8c3cba08f7da9b4dc1bfc54d5ba887b9d9bcf8eb Mon Sep 17 00:00:00 2001 From: Peter Teuben Date: Thu, 29 Jun 2023 23:45:09 -0400 Subject: [PATCH] add simple help --- animate1 | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/animate1 b/animate1 index fea3d72..232f5bd 100755 --- a/animate1 +++ b/animate1 @@ -7,10 +7,19 @@ #> RADIO xcol=x1v i,x1v,rho,press,vel1,vel2,vel3 #> RADIO ycol=vel1 i,x1v,rho,press,vel1,vel2,vel3 -# set defaults -base=LinWave -xcol=x1v -ycol=vel1 +#--HELP +# Animation of tables using NEMO's tabplot +base=LinWave # basename (including directories if needed) +xcol=x1v # X column name +ycol=vel1 # Y column name +#--HELP + + +if [ "$1" == "--help" ] || [ "$1" == "-h" ]; then + set +x + awk 'BEGIN{s=0} {if ($1=="#--HELP") s=1-s; else if(s) print $0; }' $0 + exit 0 +fi # simple keyword=value command line parser for bash for arg in "$@"; do