Hacker Public Radio

Your ideas, projects, opinions - podcasted.

New episodes Monday through Friday.


HPR3551: Bash snippet - some possibly helpful hints

Hosted by Dave Morriss on 2022-03-14 00:00:00
Download or Listen

Overview

I write a moderate number of Bash scripts these days. Bash is not a programming language as such, but it’s quite powerful in what it can do by itself, and with other tools it’s capable of many things.

I have enjoyed writing such scripts for many years on a variety of hardware and operating systems, and Bash is my favourite - partly because Linux itself is so flexible.

This is just a short show describing three things I tend to do in Bash scripts to assist with some tasks I find I need to undertake.

  1. Generate Bash variables from a text file - usually output from a program
  2. Fill Bash arrays with data from a file or other source
  3. Use environment variables to control the Bash script’s execution

Long notes

Follow this link to read the detailed notes associated with this episode.

Comments



More Information...


Copyright Information

Unless otherwise stated, our shows are released under a Creative Commons Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) license.

The HPR Website Design is released to the Public Domain.