"Bash: jq: comando no encontrado" después de agregar el archivo ejecutable jq a la variable env (windows) [duplicado]

Dec 08 2020

Quería probar un archivo json localmente con el comando (en bash) curl "https://jsonplaceholder.typicode.com/users" | jq siguiendo este video tutorial:https://www.youtube.com/watch?v=rrjIVepRqPI

Seguí cada paso y agregué el archivo ejecutable en la ruta de la variable env, pero no funcionó en absoluto, obtuve el resultado:

$ 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)

¿Me estoy perdiendo algo? ¿Por qué sigo recibiendo el error bash: jq: command not found?

Respuestas

VonC Dec 09 2020 at 14:19

Puede ejecutar un jq.exedesde git bash .

Solo necesita instalarlo en su git bash PATH:

curl -L -o /usr/bin/jq.exe https://github.com/stedolan/jq/releases/latest/download/jq-win64.exe

Entonces jq funcionará con su comando de tubería.