ProgrammingKnowledge

Videos: 198 Likes: 8,507 Views: 720,768

Videos by: ProgrammingKnowledge

Shell Scripting Tutorial for Beginners 17 – Read a file content in Bash

2 months ago
How do I read a text file line by line under a Linux or UNIX-like system using BASH shell? You can use while..do..done bash loop to read file line by line on a Linux, OSX, or Unix-like system. There are basically three ways to read file content using bash. 1a: While loop: Single line at […]

Shell Scripting Tutorial for Beginners 16 – using sleep and open terminal with WHILE Loops

2 months ago
Loop is a block of code that is repeated a number of times. The repeating is performed either a pre-determined number of times until a particular condition is satisfied ( while and until loops) To provide flexibility to the loop constructs there are also two statements namely break and continue are provided. My Website – […]

Shell Scripting Tutorial for Beginners 15 – WHILE Loops

2 months ago
Loop is a block of code that is repeated a number of times. The repeating is performed either a pre-determined number of times until a particular condition is satisfied ( while and until loops) To provide flexibility to the loop constructs there are also two statements namely break and continue are provided. My Website – […]

Shell Scripting Tutorial for Beginners 14 – Array variables

2 months ago
An array is a variable containing multiple values. Any variable may be used as an array. There is no maximum limit to the size of an array, nor any requirement that member variables be indexed or assigned contiguously. Arrays are zero-based: the first element is indexed with the number 0. Indirect declaration is done using […]

Shell Scripting Tutorial for Beginners 13 – The case statement Example

2 months ago
For more detailed Tutorial visit – goo.gl/jLzKh2 The case statement is used to execute statements based on specific values. Often used in place of an if statement, if there are a large number of conditions.The variable is compared with the values using the shell wildcards ( ? * […] ) . [a-z] ) specifies a […]

Shell Scripting Tutorial for Beginners 12 – The case statement

2 months ago
For more detailed Tutorial visit – goo.gl/jLzKh2 The case statement is used to execute statements based on specific values. Often used in place of an if statement, if there are a large number of conditions.The variable is compared with the values using the shell wildcards ( ? * […] ) , NOT regular expressions. All […]

Shell Scripting Tutorial for Beginners 11 – Floating point math operations in bash | bc Command

2 months ago
For more detailed Tutorial visit – goo.gl/ZrJh1a bc, for basic calculator (often referred to as bench calculator), is “an arbitrary-precision calculator language” with syntax similar to the C programming language. bc is typically used as either a mathematical scripting language or as an interactive mathematical shell. bc [ -hlwsqv ] [long-options] [ file … ] […]

Shell Scripting Tutorial for Beginners 11 – Floating point math operations in bash | bc Command

2 months ago
For more detailed Tutorial visit – goo.gl/ZrJh1a bc, for basic calculator (often referred to as bench calculator), is “an arbitrary-precision calculator language” with syntax similar to the C programming language. bc is typically used as either a mathematical scripting language or as an interactive mathematical shell. bc [ -hlwsqv ] [long-options] [ file … ] […]

Shell Scripting Tutorial for Beginners 10 – Perform arithmetic operations

2 months ago
For more detailed Tutorial visit – goo.gl/ZrJh1a The Arithmetic expression is very important feature for performing number arithmetic operations in scripts. By default variables are treated as strings in bash scripts. But parsing a string to numbers is very easy using double parentheses and external command such as expr. Arithmetic operations in Bash Shell Arithmetic […]

Shell Scripting Tutorial for Beginners 9 – Logical ‘OR’ Operator

2 months ago
The Logical OR “||” is a boolean operator that executes following commands based on the outcome of previously executed commands. Logical OR (||) if [[expr1 ||expr2]] Returns expr1 if it can be converted to false; otherwise, returns expr2. Thus, when used with Boolean values, && returns true if one operands are true; otherwise, returns false. […]

Shell Scripting Tutorial for Beginners 8 – Logical ‘AND’ Operator

2 months ago
The Logical AND “&&” is a boolean operator that executes following commands based on the outcome of previously executed commands. Logical AND (&&) if [[expr1 && expr2]] Returns expr1 if it can be converted to false; otherwise, returns expr2. Thus, when used with Boolean values, && returns true if both operands are true; otherwise, returns […]

Shell Scripting Tutorial for Beginners 7 – How to append output to the end of text file

2 months ago
In this video we will see how to How to append string/data to a file in Linux. Using our knowledge we have gained in the last two lessons we will see how to Append and Insert Lines to a File using bash script. My Website – www.codebind.com My Blog – goo.gl/Nd2pFn My Facebook Page – […]