Posts

Showing posts from February, 2019

variables in shell scripting

variables in shell scripting: Shell variables are created once they are assigned a value. A variable can contain a number, a character or a string of characters. Variable name is case sensitive and can consist of a combination of letters and the underscore "_". Value assignment is done using the "=" sign. Note that no space permitted on either side of = sign when initializing variables. EX: PRICE_PER_APPLE = 5 MyFirstLetters = ABC greeting = 'Hello world!'   1. A backslash "\" is used to escape special character meaning   EX: PRICE_PER_APPLE = 5 echo "The price of an Apple today is: \ $HK $PRICE_PER_APPLE " o/p: The price of an Apple today is: $HK 5     2. Encapsulating the variable name with ${} is used to avoid ambiguity   EX: MyFirstLetters = ABC echo "The first 10 letters in the alphabet are: ${MyFirstLetters} DEFGHIJ" o/p: The first 10 letters in the alphabet are: ABCDEFGHIJ   3. Encap

Linux File Systems: Ext2 vs Ext3 vs Ext4 vs Xfs