Bash ShellHow to Check File Permissions in Bash ScriptBy RahulApril 7, 2015This is good to test a file has enough permission to do read, write or execute operations. For a good…
Bash Shell5 Ways to check if a file is empty in BashBy RahulApril 2, 2015In Linux, an empty file is a file that has a size of zero bytes. This means that the file…
Bash ShellHow To Pass Command Line Arguments in a Shell ScriptBy RahulFebruary 15, 2015Bash scripts are simple text files that contain a collection of commands. Bash scripts can help with administrative tasks, task…
Bash Tips & TricksBash 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…
Bash ShellBash 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…
Bash ShellHow 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…
Bash ShellHow 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…
Bash ShellHow 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…
Bash ShellHow to change Background Color of Text in Linux ShellBy RahulNovember 15, 2014Command: echo -e “\\e[0;41mBackground in Red Color\\e[0m” The Above commands are using to set background color of output on Linux…
Bash ShellHow to change output Text color in Linux ShellBy RahulNovember 15, 2014# echo -e “e[0;31mText in Red Colore[0m” The Above commands are showing to set foreground ( Text ) color of…