什么猛砸运营商的LT;<<意思? [英] What does Bash operator <<< mean?

查看:206
本文介绍了什么猛砸运营商的LT;<<意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是什么bash的运营商的LT;<<意思是,如下code座里面呢?又是如何得出不$ IFS仍然是一个空间,而不是一个时期?

 行=7.6.5.4
IFS =。阅读-a ARRAY<<< $ LINE
回声$ IFS
回声$ {ARRAY [@]}


解决方案

据重定向字符串命令的标准输入。

在这种方式只需要为命令工艺效果直接在命令前赋值的变量;外壳保持不变。

What does the bash operator <<< mean, as inside the following code block? And how come does $IFS remain to be a space, not a period?

LINE="7.6.5.4"
IFS=. read -a ARRAY <<< "$LINE"
echo "$IFS"
echo "${ARRAY[@]}"

解决方案

It redirects the string to stdin of the command.

Variables assigned directly before the command in this way only take effect for the command process; the shell remains untouched.

这篇关于什么猛砸运营商的LT;&LT;&LT;意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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