Try https://devhints.io/bash (DevHints.io - useful resource)
cat file.txt | while read line; do
echo $line
done
set -euo pipefail
IFS=$'
'
shopt -s nullglob # Non-matching globs are removed ('*.foo' => '')
shopt -s failglob # Non-matching globs throw errors
shopt -s nocaseglob # Case insensitive globs
shopt -s dotglob # Wildcards match dotfiles ("*.sh" => ".foo.sh")
shopt -s globstar # Allow ** for recursive matches ('lib/**/*.rb' => 'lib/a/b/c.rb')
for i in /etc/rc.*; do
echo $i
done