This post is written by SathiyaMoorthy. This article is part of the ongoing Vi / Vim Tips and Tricks Series. As a Linux sysadmin or programmer, you may do following repetitive tasks while coding bash shell script: Adding file header Adding function/frame comment Including default code snippet Performing syntax check Reading documentation about a function [...]
Bash
This article will explain the sequence in which the following files are executed: /etc/profile ~/.bash_profile ~/.bashrc ~/.bash_login ~/.profile ~/.bash_logout Execution sequence for interactive login shell Following pseudo code explains the sequence of execution of these files. execute /etc/profile IF ~/.bash_profile exists THEN execute ~/.bash_profile ELSE IF ~/.bash_login exist THEN execute ~/.bash_login ELSE IF ~/.profile exist [...]
Photo courtesy of f1r3storm85 In the previous article, we discussed about Linux environment variables PS[1-4] and PROMPT_COMMAND. If used effectively, PS1 can provide valuable information right on the command prompt. In Tomb Raider, Angelina Jolie has all the gadgets and weapons at her finger tips to solve the mystery in style. While the gadget and [...]
Your interaction with Linux Bash shell will become very pleasant, if you use PS1, PS2, PS3, PS4, and PROMPT_COMMAND effectively. PS stands for prompt statement. This article will give you a jumpstart on the Linux command prompt environment variables using simple examples. 1. PS1 – Default interaction prompt The default interactive prompt on your Linux [...]