With the following code:
#!/bin/bash
export LC_ALL=C
for input_file in $(<inputflist.txt)
do
case "$input_file" in \#*) continue ;; esac
echo $input_file
done
And inputflist.txt
with the following content:
# foo.txt
bar.txt
I expect it to just print the last line bar.txt
but it prints this instead:
foo.txt
bar.txt
What's the right way to do it?