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
pythonin the linked duplicate. (There are also someawk-based solutions, but they're less capable for the usual reasons).\"instead of a literal quote, for example, that needs to turn into a"in the data instead of ending the string it's part of. And string can contain quotes (if thusly quoted), or curly braces... etc.