crontab add oneliner
(crontab -l; echo "0 */4 * * * ls")| crontab -
external IP to environment variable
export EXTERNAL_IP=$(dig @resolver1.opendns.com ANY myip.opendns.com +short)
Adding a secret to environment variable without echoing to console
read -sp "Secret: " VARIABLE_NAME
export VARIABLE_NAME
echo $VARIABLE_NAME
set random password for user
npsd=`openssl rand -base64 32`
yes $npsd | passwd root
sed substitutions
sed -i '/eula.accepted=1/c\eula.accepted=0' /opt/vconsole/config/console.properties
sed -i '/PasswordAuthentication yes/c\PasswordAuthentication no' /etc/ssh/sshd_config