Bash Arrays

Bash Arrays

Bash arrays are quite powerful and robust, but not often used in the command line. They are variables which contain multiple values often referred to as items or elements. Arrays do not have a maximum limit for items they can contain nor do the values need to be assigned or indexed contiguously.

Tags: tutorials, linux, command line

Read more »


Check If Directory Exists In Linux With Bash

Check If Directory Exists In Linux With Bash

It’s useful to know how to check if a directory exists in linux from a bash script. A directory is a folder within a path in your linux system where all sorts of files and directories are stored. Your Music folder is a directory to store music files and your Downloads folder is a directory where all sorts files are downloaded from the web. You get the idea.

Tags: tutorials, linux, command line

Read more »


Colors In Bash Scripts

Colors In Bash Scripts

Using colors in bash scripts can be very useful. If you’ve written your bash script with menus and prompts, it’s a good idea to use ansi color codes to make your outputs more readable to the user. In this tutorial I’ll cover some ways that you can use colors in your bash scripts for a more GUI like experience.

Tags: tutorials, linux, command line

Read more »


Create a Menu in a Bash Script

Create a Menu in Bash Script

Creating a menu in a bash script can be quite useful and at times necessary. A bash menu can allow you to provide options for user input. Upon user selection of an option in your menu, you can run a command or sequence of commands and display outputs.

Tags: tutorials, linux, command line

Read more »


Write Bash Functions

Writing Bash Functions

Writing bash functions is a great way to make your scripts modular. If you find you’ll be needing to repeat sets of commands or code logic, it’s a good idea to use functions to avoid redundancy in your script. Bash functions also help keep your code neat and easier to maintain.

Tags: tutorials, linux, command line

Read more »


Linux Commands To Get Hardware Info

Linux commands for hardware info

It’s always a good idea to know how to get hardware info on your linux system. It can be very useful if you need to troubleshoot a hardware issue. There can be times when you need some specific hardware info to get the right drivers. Other times you’ll need specific info to perform a hardware upgrade. The command line offers quite a few ways to obtain this hardware info with some tried and true linux commands.

Tags: linux, tutorials, command line

Read more »