Bash – Reading Command Line Arguments

Background Let us validate and display the command line arguments passed to our bash script.   Code Outline Functions validateArguments declare variables rc =0 Access global variable ( argsAsArray) get handle to array variable => ( ("${argsAsArray[@]}") get number of array entries => {#arrayArgs[@]} If number of entries in array does not match expected value … Continue reading Bash – Reading Command Line Arguments

Running Bash Scripts

Background Let us review the choices we have for running our bash scripts.   Outline filename ( script.sh ) full file name ( <folder>\<filename>) Tasks Filename ( script.sh ) Syntax Sample Output Output - Image Output - Text Explanation Error reads:- "Command not found" Full Filename ( script.sh ) Syntax Sample Output Output - Image … Continue reading Running Bash Scripts

Git – Client Tools – Install on Linux ( Cent-OS )

Background I need Git on the Cent-OS that I am working on. I am on v8 of CentOS. Outline Is Git Installed? Install Git Review Git Install Configure Git Tasks Is Git Installed? which syntax sample output Output Image Output Text Explanation We have confirmation that git is not installed.   Install Git dnf dnf … Continue reading Git – Client Tools – Install on Linux ( Cent-OS )

SQL – Concatenate

Background Across the various database systems, data Concatenation used to be everyman for himself. As in Oracle uses "|" as in:-   Transact SQL uses "+" as in:- DBA Pity the DBA he gets a query and he has to make changes to fit his\her platform. If it is a new code, he will appreciate … Continue reading SQL – Concatenate

vi – Error – “E45: ‘readonly’ option is set ( add ! to override)”

Background Trying to save a file in vi, but "No Go". Error Number Error Image Error Text E45: 'readonly' option is set (add ! to override) Troubleshooting Outline File Info ls File Info ls Syntax Sample Output Output - Image Output - Text Explanation From issuing ls, we can see that our file's owner is … Continue reading vi – Error – “E45: ‘readonly’ option is set ( add ! to override)”

Bash – Simulation Environment – Online

Background Ever so often I am not close enough to my working Linux Hosts and the Lab Network is iffy. At those times trying to work on my own Linux Hosts is annoying. Online Bash Simulation Go figure, but at those times I am a bit more successful trying out little modules via Online Simulation … Continue reading Bash – Simulation Environment – Online

Bash – Function – Return String from a function

Background Playing around with Bash and just really wrestling on how to return tokenized a string and return its parts. Honestly, it is much simpler than that. It can only have two whole pieces; I cheated and made sure of that while curating the dataset.   Options Here are the options available for returning data … Continue reading Bash – Function – Return String from a function