I'm trying to understand this code. I want to know when I execute the code how come this code outputs
"nameserver 192.168.168.2 search lan"?
There is no "cat /etc/resolv.conf" in the code so why does it output the content of the file?
#!/bin/bash
file=/etc/resolv.conf
while IFS= read -r line # IFS : inter field separator
do
# echo line is stored in $line
echo $line
done < "$file"