This question already has an answer here:
I have to run this command
sudo sh -c "echo 'nameserver 184.108.40.206' >> /etc/resolv.conf" to append a line
nameserver 220.127.116.11 into
/etc/resolv.conf file. I know, it could be possible only through subshell.
Is that it could be possible without running the command in subshell?
On which cases, a command should be runned in subshell?