The following outputs the directory display for the tmp directory. Why, and how to stop it.
#!/bin/bash
cd /tmp
echo '*' >zzz
cat zzz
IFS='' read something <zzz
echo ${something}
The following outputs the directory display for the tmp directory. Why, and how to stop it.
#!/bin/bash
cd /tmp
echo '*' >zzz
cat zzz
IFS='' read something <zzz
echo ${something}
Quote your expansions.
echo "${something}"
See Parameter Expansion, Word Splitting and Filename Expansion.
The shell scans the results of parameter expansion, command substitution, and arithmetic expansion that did not occur within double quotes for word splitting.