Skip to content

Instantly share code, notes, and snippets.

@begin29
Last active May 8, 2017 09:53
Show Gist options
  • Save begin29/a1bb2005f504160770e90847dd6a8e03 to your computer and use it in GitHub Desktop.
Save begin29/a1bb2005f504160770e90847dd6a8e03 to your computer and use it in GitHub Desktop.
bash useful commands
# check if variables is set
if [[ $1 ]]; then
echo 'variable is set!'
else
echo 'ERROR: variable is not set!'
fi
# 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