我正在尝试将curl 的输出重定向到文件。根据curl的手册页,我必须附加:
--output <file.txt>
Run Code Online (Sandbox Code Playgroud)
但是,即使我这样做,输出也不会被重定向。有人可以指导一下,我做错了什么吗?我正在尝试执行以下请求:
$ curl -v -H "Content-Type: application/json" -d '{"json":"data"}' --user email@host.com:password http://host.com/inventory/ --output haha.txt
Run Code Online (Sandbox Code Playgroud)
我在终端/shell 上获取输出,但它只是无法到达文件。
在C,(GCC编译器)中,全局变量的默认存储类是什么?
让我分享一个代码,例如:
int i;
void f()
{ --statements--}
main()
{ --- set of statements--- }
Run Code Online (Sandbox Code Playgroud)
如果我说变量i是静态的而不是外部的,我是否正确?