You are on page 1of 1

what is shell script: is a text file contain list of command to be executed

by our shell Interpreter


--part of shell Script
--Shebang (EX #!/bin/bash,#!/bin/sh)
--Commands(EX -ls, cat ,tar .git)
--shell Constructs( Ex variables,if else,case,loops,function )

Linux shell
shell is a program with primary task to excute or run other program
in lunux every cmd is a program

not when a program is in running state then that program is a process.


terminal initiate the shell,shell take input from terminal and also give output to
the
terminal
bashshell after login it look for (.bash_profile,.profile),.bashrc,.bash_logout

which ls //to know where ls command is installed


which bash //to know where bash is installed.
chsh or bash to change shell

difference btn shell variable and environment variables


Varible is a character string to whom value is assigned
value can be anything it can be any string,command,filepath or digits

processes can create and use variables

environmental variables is also shell variable


can be craeated by any process
asume process 1 initiate p2,p2 initiate p3,then p3 initiate p4

p1->p2->p3->p4

let say variable is made by process 2 and name of variable is ss


then all subsequence process will be able to use that variable p3 and p4
Therefore environment variable can be created by any process.shell process
can also create environment variable.

You might also like