Can anyone tell me why the following:
#!/bin/bash
TEST=$(echo '*** this is a test ***')
echo $TEST
...outputs a listing of the current directory, then "this is a test", then another listing of the current directory?
Background: I have some output that I'm putting in a variable, and then I want to do several different greps on the contents of that variable, but the echo is inserting all this extra stuff that shouldn't be there.
This is on OS X 10.11.4.