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 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 Generate and Verify md5 checksum of File in LinuxBy RahulNovember 30, 2014Command: md5sum myfile.php > myfile.php.md5 Above command will generate md5 checksum of file myfile.php and store in file myfile.php.md5. myfile.php.md5…
Bash ShellHow to Assign Password to User in a Shell ScriptBy RahulNovember 27, 2014Command: echo <password> | passwd –stdin <username> Example: Use the following command to change password of user jack in a…
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 Create and Manage Symbolic Links in LinuxBy RahulNovember 25, 2014Symbolic links, also known as symlinks, are special files that allow you to create a shortcut to another file or…