Difference between echo and echo -e in Shell script
Contents
echo:
It is used to print the line of text which are given between the double quotes(“….”). Literally it just print out as it is.
Example for echo
echo "Hi\n How are you? \nWhere are you from?"
Output:
Hi\n How are you? \nWhere are you from?
echo -e:
It making echo to interpret backslash escapes while print text.
Example for echo -e
echo -e "Hi\n How are you? \nWhere are you from?"
Output:
Hi
How are you?
Where are you from?