begin29
11/21/2016 - 6:59 PM

bash useful commands

bash useful commands

# encrypt
openssl enc -aes-256-cbc -in /etc/services -out services.dat

# decrypt
openssl enc -aes-256-cbc -d -in services.dat > services.txt
# check if variables is set
if [[ $1 ]]; then
  echo 'variable is set!'
else
  echo 'ERROR: variable is not set!'
fi