Created
May 19, 2022 10:11
-
-
Save vpolimenov/d1eda4e8114af2aa0023a692c975ac55 to your computer and use it in GitHub Desktop.
Update /etc/hosts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# put a command > /tmp/file_to_read.txt | |
sudo sed -i '/# start here/,/# stop here/d' /etc/hosts | |
sudo awk '/# start here/{print;flag=1;next}/# stop here/{print;flag=0}flag' /tmp/file_to_read.txt >> /etc/hosts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment