I have a shell script with the following contents. I call it with
./script.sh. Echo successfully runs, but not when I try to save its output to a variable. The same is true for all commands I've tested so far;
#!/bin/zsh echo foo # foo output=$("echo foo") # command not found: echo foo
EDIT: Fix: the last echo is inside a string!