Tag: shell scripting

Browse all articles, tutorials, and guides about shell scripting

Posts

Linux
2024-12-18|7 min read

How to Prompt for Yes/No/Cancel Input in Linux Shell Scripts

Learn how to create interactive shell scripts that prompt users for confirmation with Yes/No/Cancel options using various techniques and best practices.

Linux
2024-11-28|8 min read

Defining Variables with and without Export in Linux Shell

Understand the difference between regular shell variables and exported environment variables, when to use export, and how variable scope affects scripts and processes.

Bash
2024-11-05|8 min read

How to Check if a String Contains a Substring in Bash

Learn multiple methods to check for substring presence in Bash, including pattern matching, case-insensitive searches, and practical examples for string validation.

Linux
2024-09-12|7 min read

How to Fix Echo Newline in Bash When It Prints Literal \n

Learn why echo sometimes prints literal \n instead of newlines and discover multiple solutions to properly output newline characters in Bash scripts.

Bash
2024-07-08|6 min read

How to Check if a File Does Not Exist in Bash

Learn various methods to test for file non-existence in Bash scripts, including proper error handling, permission checks, and practical automation examples.

Linux
2024-05-20|6 min read

How to Check if a Directory Exists in Bash Shell Scripts

Learn multiple methods to check directory existence in Bash scripts, including proper error handling, permission checks, and practical use cases for reliable automation.

Bash
2024-03-15|7 min read

How to Get the Directory Where a Bash Script is Located

Learn multiple reliable methods to determine the directory path of your Bash script from within the script itself, including handling symbolic links and edge cases.