Bash

Bash History Plus Comment

If you like using Control-R in bash to find previous commands here is a useful tip. You can add a comment to a command and then when you use Control-R searching by typing you can find it by your comment. Example I use apt update. Run command including your comment…

Test Tcp Open Port

If you don’t have telnet or nc installed and want to quickly test firewall traffic to a server and specific port you can try this. It needs a new enough bash but still pretty quick and handy. Good test port is open Port not open Good test port is open…

Bash Date Usage For Naming

I am recording some scripting I used to create backup classification/retention naming. It can be simplified into one function easily but I kept it like this so I can copy and paste easier which function I need. Script is pretty self explanatory but basically it takes today’s date and name…

Expect and bash

Quick example of spawning a problem that have a password prompt and can’t accept a documented parameter for a password. I used another bash script to simulate a password prompt but in my automation challenge it was an executable that prompted. Main script just to take a password for passing…

Powerline for your terminal on Ubuntu

I noticed on Fedora it is really easy to enable powerline in your terminal. This article explains it well: http://fedoramagazine.org/add-power-terminal-powerline/ On Ubuntu 15.04 it looks like powerline is pretty easy to enable although it did not appear like the tmux or vim powerline plugins are available from regular repos. Enable…