user-home-list.sh is a simple bash script that returns the list of home directories for the users.
Now here is the weird thing:
$ A=$(./user-home-list.sh | md5sum)
$ echo $A
ddd1450681209aa2ede8696789300aa1 -
$ ./user-home-list.sh | md5sum
ddd1450681209aa2ede8696789300aa1 -
Notice the additional space before - in the output of the last command. Any clue why this is happening?