MysticMind.dev
Projects Uses About
ESC
Type to search across all posts
    No results found
    ↑↓ navigate ↵ open esc close
    Projects Uses About
    All posts

    #bash

    4 posts

    July 14, 2024 · 2 min read

    Understanding the :? Parameter Expansion in Bash

    When writing shell scripts, ensuring that certain variables are set and not empty is crucial. One handy feature in Bash for this purpose is the :? parameter expansion. The :? syntax is a form of parameter expansion in Bash that allows you to check if...

    bash linux
    July 1, 2024 · 3 min read

    A guide to handling Bash script with positional arguments

    Bash scripts often require the ability to process both positional and named (or optional) arguments. Understanding how to handle these types of arguments can greatly enhance the flexibility and functionality of your scripts. Bash provides several spe...

    bash
    June 20, 2024 · 2 min read

    Calling nested shell scripts: same process or in different process

    In Unix-like operating systems, shell scripts can be called from within other shell scripts, either to run in the same process or in a different process. Let's explore both approaches. Let us create a bash script named task.sh with the content below ...

    bash linux
    April 12, 2023 · 2 min read

    How to create unique file names in bash shell

    For debugging purposes, we had to profile a Python program using cProfile which will create a .prof file with the profiled data. Also, we wanted to create unique file names for each run using a bash shell. We had a couple of options: Use Unix epoch ...

    bash bash-script

    © 2026 Babu Annamalai. All rights reserved.