diff options
author | kaotisk <kaotisk@arching-kaos.com> | 2022-01-17 20:53:06 +0200 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.com> | 2022-01-17 20:53:06 +0200 |
commit | 8adacb20369410f1fa70e14d640d6d681b10851e (patch) | |
tree | b15eedd83d05510ea3f6e162a67f38292b8bee96 /bin/profile | |
parent | 117d9cd6208ca13f6dfdbd90ace987d076189cde (diff) | |
download | arching-kaos-tools-8adacb20369410f1fa70e14d640d6d681b10851e.tar.gz arching-kaos-tools-8adacb20369410f1fa70e14d640d6d681b10851e.tar.bz2 arching-kaos-tools-8adacb20369410f1fa70e14d640d6d681b10851e.zip |
Making the output to be JSON, log messages to log fileorigin/dev
Diffstat (limited to 'bin/profile')
-rwxr-xr-x | bin/profile | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/bin/profile b/bin/profile index 905ceba..6b0cde6 100755 --- a/bin/profile +++ b/bin/profile @@ -32,8 +32,10 @@ tempassin(){ show(){ if [ ! -z $1 ] then - echo "Working with $1" - ipfs cat $1 + logthis "Working with $1" + echo '"data":"'$1'",' + echo '"'$1'":'$(ipfs cat $1)',' + #ipfs cat $1 else echo "No DATA provided" exit 1 @@ -125,15 +127,19 @@ propset(){ index(){ FILES="$(ls -1 $ZPROFILEDIR)" i=0 + echo "{" for FILE in $FILES do - + if [ $i != "0" ]; then + echo ","; + fi PROP=$(echo $(cat $ZPROFILEDIR/$FILE | json2bash) | cut -d '=' -f 1 | awk '{print $0}') VAL=$(echo $(cat $ZPROFILEDIR/$FILE | json2bash) | cut -d '=' -f 2 | awk '{print $1}') - echo $i \| $PROP \| $VAL + echo '"'$PROP'":"'$VAL'"' let i+=1 - done + done + echo "}" } title(){ echo "ak-profile-cli" |