Cec*_*lia 2 bash json environment-variables git-bash jq
我想curl "https://jsonplaceholder.typicode.com/users" | jq 按照本教程视频使用命令(在 bash 中)在本地测试 json 文件:https : //www.youtube.com/watch?v=rrjIVEpRqPI
我按照每个步骤并在 env 变量路径中添加了可执行文件,但根本不起作用,我得到了结果:
$ 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)
Run Code Online (Sandbox Code Playgroud)
我错过了什么吗?为什么我还是报错bash: jq: command not found??
你只需要在你的 git bash PATH 中安装它:
curl -L -o /usr/bin/jq.exe https://github.com/stedolan/jq/releases/latest/download/jq-win64.exe
Run Code Online (Sandbox Code Playgroud)
然后 jq 将与您的管道命令一起使用。
| 归档时间: |
|
| 查看次数: |
8598 次 |
| 最近记录: |