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?
The "prompt" tab displays the contents of the current fish shell prompt. It allows selection from 17 predefined prompts. To change the prompt, select one and press "Prompt Set!".
fish is a smart and user-friendly command line shell for macOS, Linux, and the rest of the family. fish includes features like syntax highlighting, autosuggest-as-you-type, and fancy tab completions that just work, with no configuration required.
To give a variable to an external command, it needs to be “exported”. Unlike other shells, fish does not have an export command. Instead, a variable is exported via an option to set , either --export or just -x .
Yes, you would use pipes for this, e.g. echo "my string" | cmd
. fish has no equivalent to the <<< operator in bash.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With