I am trying to download artifacts(.war file) from artifactory through rest api. I am getting folder names from artifactory in JSON format and I wanted to get that in one variable through shell script but I am not able to do that without using JSON tool and JQ tool as my server does not contain both of these. Can someone please help me with these.
I tried below commands
$ databasename=`cat process.json | json select '.uri'`
$ echo $databasename
and
$ databasename=`jq '.uri' process.json`
as I do not have JQ and JSON tool, it failed.
$ curl -u User:API Key https://artifactory.es.abc.com/artifactory/api/storage/abc/com/xyz/aa/bb/xx/?list&listFolders=1&includeRootPath=0 > process.json
$ databasename=`cat process.json | json select '.uri'`
$ echo $databasename