Last active
May 8, 2017 09:53
-
-
Save begin29/a1bb2005f504160770e90847dd6a8e03 to your computer and use it in GitHub Desktop.
bash useful commands
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
# check if variables is set | |
if [[ $1 ]]; then | |
echo 'variable is set!' | |
else | |
echo 'ERROR: variable is not set!' | |
fi |
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
# encrypt | |
openssl enc -aes-256-cbc -in /etc/services -out services.dat | |
# decrypt | |
openssl enc -aes-256-cbc -d -in services.dat > services.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment