Created
February 28, 2017 13:56
-
-
Save mario21ic/621b01165255d627da45ac340e944d3f to your computer and use it in GitHub Desktop.
Script to add hosts into /etc/hosts from source file
This file contains hidden or 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 | |
IP=$1 | |
LINE_RESULT=$IP" " | |
while read line; do | |
LINE_RESULT=$LINE_RESULT" "$line | |
done < $2 | |
sudo echo $LINE_RESULT >> /etc/hosts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment