Shell Scripting- if control STATEment programS

1  .Shell Scripting- if control STATEment programS Conditional Statements: There are a total of five conditional statements which can be used in bash programming.   if statement This block will process if specified condition is true. Syntax:   if [ expression ] then statement fi An example of the code:   #Initializing two variables a=20 … Read more

Shell Scripting- USE of arithmetic operators

Shell Scripting- USE of arithmetic operators Operator Description Example + (Addition) Adds values on either side of the operator `expr $a + $b` will give 30 – (Subtraction) SubtractShell Scripting- USE of arithmetic operator’s right hand operand from left-hand operand `expr $a – $b` will give -10 * (Multiplication) Multiplies values on either side of the … Read more

Shell Scripting- Data types

Shell Scripting- Data types. in the case of Bash, you don’t have to define the data type of any variable at the time of variable declaration. Bash variables are untyped, which means just type the variable name by assigning its value, and it will automatically consider that data type. Such that if you assign any … Read more

Unix / Linux Shell Scripting- INPUT & OUTPUT

Output Redirection The ‘>’ symbol is used for output (STDOUT) redirection. >Output Redirection ls -al > listings Here the output of command ls -al is re-directed to file “listings” instead of your screen. Note: Use the correct file name while redirecting command output to a file. If there is an existing file with the same … Read more

Shell Scripting- USING variableS

How to create Variables in Shell Scripts To set a variable in the shell, use the syntax:- var=value Note – Variables are case-sensitive so, after they are defined, they must later be spelled using exactly the same uppercase and lowercase letters. Variable names have a limit of 255 characters. Do not place spaces around the … Read more

Shell CommanDS

Shell CommanDS. A shell is a special user program that provides an interface to the user to use operating system services. Shell accepts human-readable commands from the user and converts them into something which the kernel can understand. It is a command language interpreter that executes commands read from input devices such as keyboards or … Read more

Vi Editor & itS comMANDS

Vi Editor & its commands. The VI editor is the most popular and classic text editor in the Linux family. Below, are some reasons which make it a widely used editor – It is available in almost all Linux Distributions It works the same across different platforms and Distributions It is user-friendly. Hence, millions of … Read more

Implementation of ROUNd Robin SchedULing

Implementation of ROUNd Robin SchedULing. Round-robin is a CPU scheduling algorithm that shares equal portions of resources in circular orders to each process and handles all processes without prioritization. In the round-robin, each process gets a fixed time interval of the slice to utilize the resources or execute its task called time quantum or time … Read more

Implementation OF SJF ScheDULing Algorithm

Implementation of SJF ScheDULing algorithm. Shortest Job First (SJF) is an algorithm in which the process having the smallest execution time is chosen for the next execution. This scheduling method can be preemptive or non-preemptive. It significantly reduces the average waiting time for other processes awaiting execution. The full form of SJF is Shortest Job … Read more

Implementation OF FCFS ScheDULing Algorithm

Implementation of FCFS Scheduling algorithm. FCFS Scheduling The first come first serve (FCFS) scheduling algorithm simply schedules the jobs according to their arrival time. The job which comes first in the ready queue will get the CPU first. The lesser the arrival time of the job, the sooner will the job gets the CPU. FCFS … Read more