Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save arnathan2k/9fb5b7f756c47cb0d448207299b47cf7 to your computer and use it in GitHub Desktop.
Save arnathan2k/9fb5b7f756c47cb0d448207299b47cf7 to your computer and use it in GitHub Desktop.
#top of the file
sed -i '1s/^/your text\n/' file
#End of the file
sed -i "2i192.241.xx.xx venus.example.com radious" /etc/hosts
or
echo "192.241.xx.xx venus.example.com radious" >> /etc/hosts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment