Terminal Colors with Bash

The following is a script I would use for testing. I used it for viewing colors and layout; it’s good for enhancing script feed-back when the script is interactive. [sourcecode language=”bash”] #!/bin/bash #——————————— # # Script Name: color_run.sh # Version: 0.1.1 # Created on: 3/2/2011 Jeff Neuffer Jr # Updated on: $Id: color_run.sh 105 2013-03-17... » read more

JUNOS, Scripting and SSH-AGENT

In two previous blog entries I talked about leveraging ssh-agent with scripting. Below is an example script I use to run different commands on Junos based routers. This particular script is menu driven from the terminal prompt. Beyond the menu the script is non-interactive. It is plausible to write a script that will request user... » read more

Not quite a multidimensional array (hack)

So the following doesn’t do anything except illustrate how I worked around BASH not support multidimensional arrays. In my production code (not the below example) I used the below loop to call an expect script. The expect script does the work of logging into the router(s). The output from expect is then piped to AWK,... » read more

Need multidimensional

I wish bash supported multidimensional arrays.  So I either chose the wrong tool for the current job, or I have to rethink the approach I’m using in order to keep using bash.