Shell ScriptingBash while Loop with ExamplesBy RahulJanuary 8, 2015A while loop is a fundamental control structure in Bash scripting that allows you to execute a block of code…
Shell ScriptingBash for Loop with ExamplesBy RahulJanuary 7, 2015Bash is a popular shell used on Linux and macOS systems. It is a powerful tool for automating repetitive tasks…
Shell ScriptingHow to split a string on a delimiter in bashBy RahulDecember 2, 2014We can use an internal field separator (IFS) variable to parse an array. Let’s use an example script, where first…
Shell ScriptingHow to Find Script file name in a Bash ScriptBy RahulDecember 2, 2014Command SNAME=$(basename “$(test -L “$0” && readlink “$0” || echo “$0″)”) While running a bash script using Linux terminal the…
Shell ScriptingHow to Create Infinite while Loop in Bash ScriptBy RahulNovember 27, 2014Command: while true;do echo “Press CTRL+C to Exit”; done Example 1: Some times we are required to execute some commands…
Shell ScriptingHow to Use Newline character ( \n ) in Bash ShellBy RahulNovember 14, 2014Questions – How can I print a newline as \n in bash shell? How to use \n in a shell…
Shell ScriptingHow to Prompt for User Input in Shell ScriptBy RahulNovember 5, 2014Everyone wants their scripting to be more interactive, especially users. Users want to feel like they’re working with a modern…
Shell ScriptingBash Case Statement Syntax and ExamplesBy RahulMay 13, 2014The CASE statement is a powerful conditional statement in Bash that allows you to test a variable against a list…
Shell ScriptingBash if-elif-else StatementBy RahulMay 10, 2014In this comprehensive tutorial, we will delve into the Bash if elif else statement, a crucial control structure in shell…
Shell ScriptingBash Script to Check if a File or Directory ExistsBy RahulApril 16, 2014In this comprehensive guide, we’ll explore how to check if a file or directory exists in Bash. Bash, or the…