Created
June 25, 2018 15:24
-
-
Save simbalinux/f0d87b086bd82caa5f348276536fa7dd to your computer and use it in GitHub Desktop.
Appending a string to an existing configuration 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
global_entry=" | |
global | |
log 127.0.0.1 local0 | |
log 127.0.0.1 local1 debug | |
maxconn 45000 # Total Max Connections. | |
daemon | |
nbproc 1 # Number of processing cores." | |
echo "$global_entry" | |
file=tester | |
grep -qF "$global_entry" "$file" || echo "$global_entry" | sudo tee --append "$file" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment