That's neat. I just tried something similar:
FORTUNE=$(fortune) && echo $FORTUNE && echo "Convert the following output of the Unix `fortune` command into a small screenplay in the style of Shakespeare: \n\n $FORTUNE" | ollama run phi4
Doesn't `fortune` inside double quotes execute the command in bash? You should use single quotes instead of backticks.