将内部场分隔符与curl配合使用 [英] Using the internal field separator with curl

查看:157
本文介绍了将内部场分隔符与curl配合使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我这样做时...

ls$IFS-l

...我得到了我期望的输出.

... I get the output I expect.

我这样做的时候...

When I do...

curl$IFShttp://www.google.com

...我不知道.

我是否误解了内部字段分隔符?如何在不使用空格字符的情况下运行curl命令?

Am I misunderstanding internal field separators? How could I run a curl command without using any space characters?

推荐答案

您需要将变量放在大括号中,否则外壳程序将查找名为"IFShttp ..."的变量:

You need to put the variable within curly brackets, otherwise the shell looks for a variable called "IFShttp...":

curl${IFS}http://www.google.com

这篇关于将内部场分隔符与curl配合使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆