Here-string 也可以使用shell(包括Bash)支持的here-string将变量添加到awk中: variable=123abc awk '{print $0}' <<< "$variable
您也可以使用here doc or here-string重定向或将另一个命令的输出通过管道传递到wall。
一、什么是Here Document Here Document也被称为here-document/here-text/heredoc/hereis/here-string/here-script,在Linux
您可以使用其他方法(例如管道,here-string或heredoc)将标准输入传递给read,而不是在终端上输入 echo "Hello, World!"
以某参数运行程序 run < file 以某文件为标准输入运行程序 run < <(cmd) 以某命令的输出作为标准输入运行程序 run <<< $(cmd) 以某命令的输出作为标准输入运行程序 Here-String
以某参数运行程序 run < file 以某文件为标准输入运行程序 run < <(cmd) 以某命令的输出作为标准输入运行程序 run <<< $(cmd) 以某命令的输出作为标准输入运行程序 Here-String