问题
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