"Bash: jq: command not found" après l'ajout du fichier exécutable jq à la variable env (windows) [duplicate]
Dec 08 2020
Je voulais tester un fichier json localement avec la commande (en bash) curl "https://jsonplaceholder.typicode.com/users" | jq
en suivant ce tutoriel vidéo:https://www.youtube.com/watch?v=rrjIVepRqPI
J'ai suivi chaque étape et ajouté le fichier exécutable dans le chemin de la variable env, mais ne fonctionne pas du tout, j'ai obtenu le résultat:
$ curl "https://jsonplaceholder.typicode.com/users" | jq
bash: jq: command not found
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 4670 0 4670 0 0 8584 0 --:--:-- --:--:-- --:--:-- 8584
curl: (23) Failed writing body (795 != 1369)
Est-ce que je manque quelque chose? Pourquoi j'ai encore une erreur bash: jq: command not found
??
Réponses
VonC Dec 09 2020 at 14:19
Vous pouvez exécuter un à jq.exepartir de git bash .
Il vous suffit de l'installer dans votre git bash PATH:
curl -L -o /usr/bin/jq.exe https://github.com/stedolan/jq/releases/latest/download/jq-win64.exe
Ensuite, jq fonctionnera avec votre commande pipe.