#!/bin/bash
#
# Three important configuration files:
#   - .bash_profile
#   - .bashrc
#   - .bash_logout
#
#
# .bash_profile
#
# Executed for login shells right after executing /etc/profile.
# Runs only once when you first log in your system: to a text console,
# remotely via ssh, or when you launch Bash --login.
#
# You put here commands that should be run only once per session, and
# environment variables that should be inherited by all subsequent
# subshells and processes
#
# BASH allows two synonyms for .bash_profile:
#   - .bash_login
#   - .profile
# (If you have more than one, only one is processed --in the order here
# written.)
#
#
# .bashrc
#
# Executed for interactive non-login shells after /etc/bash.bashrc.
# It runs every time you start a new terminal window or tab in a graphical
# environment, or when you type 'bash' in the command line.
#
# You put here commands that should be run for every new shell instance,
# such as aliases, functions, shell prompts, etc.
#
# In many systems, .bash_profile sources .bashrc so that login shells are
# consistent with non-login shells in terms of environment, etc. 
#
# Make sure .bashrc does not print anything on the terminal.
# If you want to print some message from .bashrc, check first that it is
# executed interactively:
#                          [[ $- == *i* ]] || return
#
# NOTE: If you edit any of this files and want them to take effect
# immediately, you need to source (run) them. Why?
#
#
# .bash_logout
#
# Executed every time a login shell exits.
# Useful to remove temporary files, to leave an exit flag, to compute for
# how long you have been in the system, etc.
#
#
# EXERCISE 1: Inspect these files and understand what they do.
# EXERCISE 2: Write/modify them and test them.
#
#
# SHELL OPTIONS
#
# Binary features that determine how the shell behaves.
# Can be set on or off with:
#   - set -o|+o optionname
#   - shopt
#
# Type 'set -o' to check the status of all options.
# Lots of them!
#
# 'shopt' is the modern way of setting shell options.
# Type 'shopt -p' to check current options and status.
# Lots of them!

