fish reading file into (env) variable
- Command substitutions and variables: Fish for bash users — fish-shell 3.7.1 documentation
string collect
: string-collect - join strings into one — fish-shell 3.7.1 documentation- SO: Read file into environment variable? · Issue #7323 · fish-shell/fish-shell:
set VARNAME (cat ~/myfile | string collect)
Here string collect
makes sure it’s a multiline variable instead of an array composed of one element per line.
Nel mezzo del deserto posso dire tutto quello che voglio.
comments powered by Disqus