I want to store the output of a bash command to a string in a bash script. The part that matters is as follows:
#!/bin/bash
player_status="$(playerctl -l)"
The output of the command when run on terminal (not with the bash script) is "No players were found". When I run the bash script (note that there is not an echo) it outputs "No players were found" to the terminal. I want it instead to not put it in the terminal but instead the variable.