Is the output of a Bash command stored in any register? E.g. something similar to $? capturing the output instead of the exit status.

I could assign the output to a variable with:

output=$(command)

but that’s more typing…

14 Answers
14

Leave a Reply

Your email address will not be published. Required fields are marked *