How do I redirect a string in Fish?

冷暖自知 提交于 2019-11-30 02:37:09

问题


I want to redirect a string into the STDIN of a command.

I would do it using something like cmd <<< "my string" in Bash, or even cmd <<EOF ... EOF. But I can't seem to do either in Fish. What am I supposed to do here? Are pipes the only way?


回答1:


Yes, you would use pipes for this, e.g. echo "my string" | cmd. fish has no equivalent to the <<< operator in bash.



来源:https://stackoverflow.com/questions/25043743/how-do-i-redirect-a-string-in-fish

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!