Created
December 12, 2018 08:58
-
-
Save sturman/fac2572fe9de5fba6ad60cba55296bf1 to your computer and use it in GitHub Desktop.
simple bash script to download default redis.conf and remove all comments and empty lines from it
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
#!/usr/bin/env bash | |
function removeComments() { | |
# remove line that starts with # | |
sed '/^#/ d' < redis_default.conf > redis_default_without_comments.conf | |
# remove line that starts with space | |
sed '/^[[:space:]]*$/d' < redis_default_without_comments.conf > redis_default_clean.conf | |
} | |
wget http://download.redis.io/redis-stable/redis.conf -O redis_default.conf | |
removeComments |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment