From 228edf4461f4b9ab3f62ac23aac025234860f11f Mon Sep 17 00:00:00 2001 From: Shihaam Abdul Rahman Date: Fri, 21 May 2021 03:13:19 +0500 Subject: [PATCH] call me regex king not - it broke sup --- bml-cli.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bml-cli.sh b/bml-cli.sh index 178779f..1e1d615 100755 --- a/bml-cli.sh +++ b/bml-cli.sh @@ -471,7 +471,7 @@ api_activites(){ activities(){ echo Current Page: 1 echo $API_ACTIVITES | jq -r '["Type","Date","Time","Contact","Amount","Remarks","Status"], ["=====","==========","=====","============","=======","==================","==========="],(.payload | .content | .data | .[] | [.type, .datetime, .creditName, .formattedAmount, .message, .status]) | @tsv' \ - | sed "s/+05:00//g" | sed "s/[0-9]T[0-9]/ /g" | perl -pe 's/((?<=\t)|(?<=^))\t/ \t/g;' "$@" | column -t -s $'\t' | exec less -F -S -X -K + | sed "s/+05:00//g" | perl -pe 's/((?<=\t)|(?<=^))\t/ \t/g;' "$@" | column -t -s $'\t' | exec less -F -S -X -K while true; do echo "" echo Total Pages: $PAGETOTAL @@ -483,7 +483,7 @@ activities(){ echo Current Page: $PAGENO curl -s -b $COOKIE $BML_URL/activities?page=$PAGENO \ | jq -r '["Type","Date","Time","Contact","Amount","Remarks","Status"], ["=====","==========","=====","============","=======","==================","==========="],(.payload | .content | .data | .[] | [.type, .datetime, .creditName, .formattedAmount, .message, .status]) | @tsv' \ - | sed "s/+05:00//g" | sed "s/[0-9]T[0-9]/ /g" | perl -pe 's/((?<=\t)|(?<=^))\t/ \t/g;' "$@" | column -t -s $'\t' | exec less -F -S -X -K + | sed "s/+05:00//g" | perl -pe 's/((?<=\t)|(?<=^))\t/ \t/g;' "$@" | column -t -s $'\t' | exec less -F -S -X -K elif [ "$PAGENO" -gt "$PAGETOTAL" ] then display_banner && display_name && display_userinfo