Bash: Output

Example: Simple Output in Bash


	#!/bin/bash
	# A sample Bash script by John Smith
	echo Today is a good day to code Bash
	

Output:

  Today is a good day to code Bash

Example: Special characters and tabs in Bash

The -e below allows for the use of special characters in the echo line, in this case the \t used to tab over.


	echo -e "Name: \t John Smith"
	echo -e "Name: \t Mary McDonald"
	

Output:

  Name:   John Smith
  Name:   Mary McDonald