I have a text file which contains an asterisk as the first character in every line, when I try to process the file in a script like this:
while read line; do
out=$(echo $line | awk '{ print $3 }')
echo $out
done < file_with_asterisks
It is printing the files in the current working directory, not the 3rd column as I want.
Removing the asterisk solves the problem, so I figured out it was doing globbing.
How do I make bash take the asterisk as text and not a wildcard?