How To Record Everything You Do In Terminal - OSTechNix

<img src="/img/2017/03/record-everything-you-do-in-terminal.png" alt=""> Synopsis: script -a my_history mkdir test cd test touch hello_world.txt echo 'Hello World' > ./hello_world.txt # This closes the "script -a my_history" file exit Source: How To Record Everything You Do In Terminal - OSTechNix

bash script to generate config or property file from a template file containing variables

Sometimes we have configuration or properties file (as templates) such as httpd.conf or server.conf where we want to dynamically replace $variables with values before writing the output to a new file. Example: # httpd.conf.tmpl SetHandler server-status Order deny,allow Deny from all Allow from $MONITOR_IP We want to develop an install script in Bash such that it reads the httpd.conf.tmpl and replaces the $STATUS_URI and $MONITOR_IP with appropriate values (either passed in as script arguments or coded in the bash script) and then write out the resulting output to a new file such as /tmp/httpd.

merging bash ssh session history

<img src="/img/2016/11/linuxlogo.png" alt="linuxlogo"> You may have observed once in a while that when you SSH onto a server and you try to look up a command you ran earlier (maybe the previous day) in the “history” output but you do not see it. This is because of how a SSH session works! Each time you ssh into a server, it leverages a set of TTY screens to maintain an individual history for that session.