【发布时间】:2021-03-19 23:11:15
【问题描述】:
我想通过以下教程视频使用命令(在 bash 中)curl "https://jsonplaceholder.typicode.com/users" | jq 在本地测试 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)
我错过了什么吗?为什么我仍然收到错误bash: jq: command not found??
【问题讨论】:
-
你下载了一个window exe文件。从 powershell 或 Windows 命令提示符执行它
-
@RamanSailopal 嗨,我在 CMD 中尝试过,它给了我错误
'jq' is not recognized as an internal or external command, operable program or batch file. -
我无法在 CMD 中执行
cat,但我可以在 bash 中运行cat,无法在 bash 和 CMD 中运行 `jq` -
你在运行 WSL
标签: json bash environment-variables jq git-bash