Unix Shell Scripting Part 1 | UNIX Tutorial | Mr. Subba Raju

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi guys welcome to nourish a technologies in this video session we'll observe what is shell shell programming difference between scripting and programming languages types of shells features of shells different flowers also will observe shell collection of Unix commands is called shell script general in every operating system shell script is a common word script is nothing but weekly or loosely typed programming what are the characteristics of shell programming or shell scripting actually shell means there are the lump-sum unix commands at a time we can able to execute a single unix command or two commands or three sometimes client requirement one command unable to satisfy our two commands unable to satisfy or three comments unable to satisfy that x we are going to add all these commands into one file that file we are executing the file is called shell because every shell script ends with dot sh standard shell is nothing but a Shh this is popularly known as bourne shell or bash shell the shell scripting in 1970s implemented by steven born with the help of seasoned taxes so basically bash shell is the default shell you want to know what shell in your system available just to go to command prompt echo and enter whatever the shell you required for example echo dollar 0 whenever you are entering a code dollar 0 the related shell prompt will be displayed even you can change from one shell to another shell so once a bash it is plain you want to convert into K H means console just like she'll name you can type hit the return key it is converting into corn cash H now you want to see converted or not echo dollar 0 again displaced con shell you want to exit from one shell to another shell and e^x IP it's it is the command to exit from current shell to new shell so these are the commands to know about what shell currently running there are the several shells as I said and commonly we are using bash what is a bash prompt bash prompt easy dollar and bash prompt syntax is a Shh standard shell and the shell how you are displaying all that I said echo now practically this shell related operations will observe before observing what are the features of shell scripting there are the several features available feature number one execute lump sum commands at a time second feature whatever the duty we need to perform every day one shutdown one log of one restart one creation one deletion we can do auto met with the help of programming mean scripting and third one Shelley is performing a duty n number of times means repeatedly no need to write a commands and these shells having some characteristics these characteristics one by one practically we can see on the system but just I provided here only what is shell and how the shell is going to be displaced that prompt the deviated prompter prompt we can say yes practically we can see shell programming or a digital definition implemented here collection of unix commands is called unix is shell in every operating system as I said shell available collection of DOS commands shell collection of videos commands windows shell collection of linux commands linux shell collection of unix commands unix shell again in unix operating system shelby's different different features available customizing work environments already made this point automating your daily tasks automating repetitive tasks like this several features available main uses of shell script is when a single unix command unable to satisfy client requirement will make together some unix commands will run at a time that is a real shell usage there are the different types of shells available these three shells commonly we are using bone shell default sea shell conch shell so bone shall only we are calling as a standard shell i'm a definition very clearly standard shell available and bones shall develop the steven bone that is the reason we are calling bone shell this one and prompt dollar and execution command is a Shh same sea shell is built joy developed on seas in taxes that is a reason we are calling sea shell c shell prompt is this one execution CSH conch shell david korn implemented the prompt ease dollar in AT&T bell laboratories and prompt ease dollar cash which is the prompt of the shell and now responsibilities means watch shell exactly performing there are the different things performing program execution variables ivory direction pipelines filters environment control as well as interpreted programming language these are the responsibilities characteristics of your shell programming shell scripting commonly shell variables means what generally variable is nothing but the data name and it is used to save some kind of or terms to store some kind of values available to type system different variables user defined variables so i will show you how to define that and what is the main difference between scripting and other programming languages script means weekly or loosely typed programming and programming languages are strictly typing in tax based completely and when you are coming to scripting maximum interpreter based when you are coming to programming languages compiler based and when you are coming to scripting mainly any kind of script you can take JavaScript live script vbscript shell script perl script all these are installation whenever we are performing less libraries available no header files required when you are coming to programming languages more libraries available and header files compulsory and special environment not required for the scripting but every programming language required specially environment and setup is required and if you are coming to UNIX operating system even Paul also no need to install here so what is the meaning of pol practically extraction report a language about that I will discuss and these are the main differences between scripting and programming languages and when you are coming to system different variables or user defined variables will observe how we are going to define the variables and before I am showing practically that there are the several environment variables available how to display these environment variables also I will show you one by one and clear it for example I am declaring X is equal to 33 set echo dollar X so it is representing address dollar Empress on type and echo for example you said dollar why why I didn't declare here so it is not giving you n 0 also but for example I said Y is equal to 0 if I say that and echo and I said Y so this is 0 so like this information related to variables and echo command already in my previous session completed just you can try to view they are clearly available about the echo now these variables declaration X is a user different here I declared where I declared echo dollar 0 where I declared bash shell programming so now I am converting into console now the prompt is console echo dollar zero you can say echo dollar 0 and console now here that value I want to display echo dollar values not there so means where you declare the variable there all it is possible to view or there only is possible to use and if you want to make the variable as a global scope that time you need to use there is a keyboard available export X so when you are saying export X the X variable is available to all shells just hit the return key and say here echo dollar X yes what is Australia available dollar 0 bash shell convert into console again a coal dollar and X again say yes perfectly so export is the keyboard to make global scope means it is exporting to all available shells again exit from there it is exit is a command to exit from one shell to another shell like this we can change shell prompts also now I am coming to environment variables generally UNIX is case sensitive operating system echo for example dollar I said home and echo and I said dollar logname log name and echo dollar user capital letters only environment variables like this echo primary prompt I want to see dollar ps1 I want to see secondary prompt echo dollar ps2 secondary like this different prompts also available here so this is what exactly the meaning of environment variables will view how many number of available a big list available a few I am showing to you here display editor group display you want to display a code doll or display capital letters must be a code dollar editor echo doll or group a code dollar home echo dollar host like that remaining environment variables also we can able to display and user defined variables just now as shown to you how to define these are the shell keywords or reserved words there are the many reserved words available these are the few reserved words which we are using frequently in the shell programming area and finally shell script is classified into two types interact to non-interactive what is non-interactive what is interactive shell script non interactive shell script means while script is running the input does not required from the user or from the keyboard that is a non interactive shell scripts what is an interactive shell script while script is running or execution time it is asking the required input from the user or from the keyboard is called interactive shell scripts and one example we can try to now in this in this path I am here available PWD right now in my name path available LS CD shell already clearly shell programming implementation available there are the different different shells available exe I said already shell UNIX operating system level files colors symbols and different kind of notations I implemented in the video session to please refer for more colors and rotations refer video number 2 now these are the exe files color is green symbol is a string now I want to write here a file so V I is the editor my script is the file name dot SH is the extension I am writing one sample program how to write a now to execute I'll show you directly a sample shell programming hit the return key and already program previously available it is a disturbed it is showing recovery do you want to recovery type it is asking so that I do not want I do not want means queue and quit so I am writing a new one so VI my script one dot Sh there is a new script I am writing yes if file available it will open a file not available it creates and bottom of the screen you can observe VA is the editor my script one is the file name SH is the extension and dot here we are calling as a period press Enter or return key and it is giving it is a new file and available in command mode already explained about VA modes three modes available command the mode insert mode e^x command mode it is in command mode if I am pressing I observe ear converting into insert mode and you can enter and hash hash is nothing but a comment in shell scripting it is my first script now I am writing simple e non interactive programming I am showing echo welcome to welcome to the world of welcome to the world of shell scripting double quotation so welcome to the world of shell scripting and echo I am writing single quotation default default script is default script is a bash single quotation no quotation also we can write thank you and I said simply and I am going to close means echo does not require compulsory singular double quotes are nothing so that I already explained to you because shell is the loosely type of programming weekly type of scripting so rules may not be maintained not compulsory but sometimes always maintain double quotation is the best programming always now I am coming insert mode press escape converted into command mode nothing available shift to : WQ save and exit yes now I want to run that s a shh-shh-shh file name dot SH press Enter or return key it is giving perfect answer so this is the way we are implementing shell programming shell scripting for example in my program there is a mistake available definitely and I did a mistake here and how this mistake is going to be view perfect it is going to display and now I am executing giving very clearly line 3 echo command not phone next because it is interpretation wherever perfect that is getting executed now I am going to modification VA insert mode and I am giving whatever required escape shift : WQ now execute the script perfectly and executed so this is the way we can able to implement shell programming thank you for watching my videos for more videos login into youtube.com slash so more some more videos I will try to upload on shell programming mainly bash shell programming
Info
Channel: Naresh i Technologies
Views: 303,406
Rating: undefined out of 5
Keywords: UNIX, Subba Raju, UNIX File Permissions, Hands on UNIX Training, Online Unix Traininig, UNIX Tutorial Videos, UNIX Interview Questions, Shell Scripting, UNIX Tutorial, Unix Shell Scripting, shell scripting examples, shell scripting examples programs, unix shell scripting examples for beginners, shell scripting examples for beginners, shell scripting tutorial for beginners, what is shell scripting, shell scripting important
Id: k4Ww6gFeF0M
Channel Id: undefined
Length: 16min 23sec (983 seconds)
Published: Thu Oct 13 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.