Getting two different results when ‘cat’ing a file, and ‘cat’ing a file into a variable in zsh?

The file in question is /sys/class/power_supply/BAT0/status.

When I cat it, I receive Full. But when I do status="$(cat /sys/class/power_supply/BAT0/status)" and then echo status, I receive 1 when I want it to output Full. I’m sure I’m just being an idiot and missing something obvious. Any help is appreciated.

Go to Source
Author: LTWood