title
Shell Scripting Tutorial

description
Code and Transcript Here : http://goo.gl/rr9aPB Subscribe to Me: http://bit.ly/2FWQZTx Best Book on Shell Scripting : http://amzn.to/1UInpBU In this one video I'll cover Vim, Input, Output, Variables, Math, Functions, Executing Python Functions, Conditionals, Strings, Arrays, Looping, Positional Parameters, Parameter Expansions and a whole lot more. MY UDEMY COURSES ARE 87.5% OFF TIL December 19th ($9.99) ONE IS FREE ➡️ Python Data Science Series for $9.99 : Highest Rated & Largest Python Udemy Course + 56 Hrs + 200 Videos + Data Science https://bit.ly/Master_Python_41 ➡️ C++ Programming Bootcamp Series for $9.99 : Over 23 Hrs + 53 Videos + Quizzes + Graded Assignments + New Videos Every Month https://bit.ly/C_Course_41 ➡️ FREE 15 hour Golang Course!!! : https://bit.ly/go-tutorial3 I LIVESTREAM CODE HERE : https://www.twitch.tv/derekbanas MY DISCORD : https://discord.gg/VckHCAvA ( Contact Me Anytime ) Like the channel? Consider becoming a Patreon! Check it out here: ►► https://www.patreon.com/derekbanas *Watch More Learn in One Videos* ►► Java - https://youtu.be/n-xAqcBCws4 ►► C++ - https://youtu.be/Rub-JsjMhWY ►► Python - https://youtu.be/N4mEzFDjqtA ►► MySQL - https://youtu.be/yPu6qV5byu4 ►► PHP - https://youtu.be/7TF00hJI78Y ►► Kotlin - https://youtu.be/H_oGi8uuDpA ►► C# - https://youtu.be/lisiwUZJXqQ ►► JavaScript - https://youtu.be/fju9ii8YsGs

detail
{'title': 'Shell Scripting Tutorial', 'heatmap': [{'end': 3274.653, 'start': 3230.144, 'weight': 1}], 'summary': "Tutorial 'shell scripting basics' covers writing bash shell scripts, using python in shell scripts, defining functions, logical operators, and advanced techniques, including while and for loops, and array manipulation in bash, with practical examples and explanations.", 'chapters': [{'end': 458.834, 'segs': [{'end': 34.43, 'src': 'embed', 'start': 0.114, 'weight': 0, 'content': [{'end': 3.176, 'text': 'Well hello internet and welcome to my shell scripting tutorial.', 'start': 0.114, 'duration': 3.062}, {'end': 8.619, 'text': "In this one tutorial I'm going to teach you the basic syntax of how to write bash shell scripts.", 'start': 3.216, 'duration': 5.403}, {'end': 18.206, 'text': "And I'm also going to focus in specifically on input, output variables, math, creating your own functions, how to execute Python functions,", 'start': 9.22, 'duration': 8.986}, {'end': 20.167, 'text': 'conditional strings, arrays, looping.', 'start': 18.206, 'duration': 1.961}, {'end': 26.789, 'text': "And then we're also going to cover a lot about how to use Vim, because that is going to be the editor that I'm going to be using here.", 'start': 20.447, 'duration': 6.342}, {'end': 34.43, 'text': 'And basically a shell script is just going to contain commands that are executed inside your terminal, just as if you type them in the terminal.', 'start': 27.009, 'duration': 7.421}], 'summary': 'Tutorial covers basic bash shell script syntax, input/output, variables, functions, python integration, vim usage, and terminal command execution.', 'duration': 34.316, 'max_score': 0.114, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hwrnmQumtPw/pics/hwrnmQumtPw114.jpg'}, {'end': 81.719, 'src': 'embed', 'start': 55.363, 'weight': 4, 'content': [{'end': 60.027, 'text': "if you do not have it installed, you're just going to type in sudo apt.", 'start': 55.363, 'duration': 4.664}, {'end': 67.292, 'text': 'get install vim like that and hit enter, and it might ask you for a password, and then it will install it.', 'start': 60.027, 'duration': 7.265}, {'end': 72.036, 'text': 'And you may have to restart the terminal after that, but otherwise everything is ready to go.', 'start': 67.593, 'duration': 4.443}, {'end': 76.337, 'text': "So now that we have Vim installed, let's talk about how to use Vim.", 'start': 72.436, 'duration': 3.901}, {'end': 77.898, 'text': 'And I think this is very important.', 'start': 76.517, 'duration': 1.381}, {'end': 80.659, 'text': "So let's just go and create a little file called test.", 'start': 77.958, 'duration': 2.701}, {'end': 81.719, 'text': 'And there we are.', 'start': 81.019, 'duration': 0.7}], 'summary': 'Transcript explains how to install and use vim, emphasizing its importance.', 'duration': 26.356, 'max_score': 55.363, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hwrnmQumtPw/pics/hwrnmQumtPw55363.jpg'}, {'end': 290.252, 'src': 'embed', 'start': 266.957, 'weight': 2, 'content': [{'end': 280.324, 'text': "You could also come into vim and verify which vimrc file you're going to be using by just coming in and typing in echo and then dollar sign and my vimrc,", 'start': 266.957, 'duration': 13.367}, {'end': 283.546, 'text': 'and you can see that it is using the one that is inside of my home directory.', 'start': 280.324, 'duration': 3.222}, {'end': 288.23, 'text': "Okay, so there's just the basics of how to use Vim as this tutorial continues.", 'start': 283.786, 'duration': 4.444}, {'end': 290.252, 'text': "We're going to be doing a lot more with it.", 'start': 288.25, 'duration': 2.002}], 'summary': 'Basic vim usage: verifying vimrc file location in home directory.', 'duration': 23.295, 'max_score': 266.957, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hwrnmQumtPw/pics/hwrnmQumtPw266957.jpg'}], 'start': 0.114, 'title': 'Shell scripting basics & vim usage', 'summary': 'Covers the basics of writing bash shell scripts, including input, output, variables, math, creating functions, executing python functions, conditional strings, arrays, and looping, as well as the usage of vim for editing. additionally, it explains the installation process for vim.', 'chapters': [{'end': 77.898, 'start': 0.114, 'title': 'Shell scripting basics & vim usage', 'summary': 'Covers the basics of writing bash shell scripts, including input, output, variables, math, creating functions, executing python functions, conditional strings, arrays, and looping, as well as the usage of vim for editing. additionally, it explains the installation process for vim.', 'duration': 77.784, 'highlights': ['The chapter covers the basics of writing bash shell scripts, including input, output, variables, math, creating functions, executing Python functions, conditional strings, arrays, and looping. This section provides a comprehensive overview of the topics to be covered in the tutorial, offering a broad understanding of the content.', 'The usage of Vim for editing is explained. The tutorial includes detailed information on how to use Vim, emphasizing its importance in shell scripting.', "Explanation of the installation process for Vim is provided. It guides users through the installation of Vim using 'sudo apt. get install vim' command, ensuring readiness for further usage."]}, {'end': 458.834, 'start': 77.958, 'title': 'Introduction to vim basics', 'summary': 'Explains the basics of using vim, including creating, navigating, saving, and customizing files, as well as executing scripts, with tips on file management and permission settings.', 'duration': 380.876, 'highlights': ["You can navigate within the file using commands like 'w', 'b', '0', '$', 'G', 'A', and arrow keys in insert mode.", "You can save and quit Vim by using commands like ':WQ' or quit and discard changes using ':q!'", 'You can customize Vim settings such as displaying line numbers, turning on syntax highlighting, setting tab stops, and enabling auto indent by modifying the .vimrc file in the home directory.', "You can change file permissions using 'chmod' command to define read, write, and execute permissions for owner, group, and others, represented by the numbers 7, 5, 6, 4, 3, 2, 1, and 0.", "You can create and execute a script in Vim by entering insert mode, adding a shebang line, writing the script, and saving the file, then changing the file permissions to make it executable with 'chmod 755 filename'."]}], 'duration': 458.72, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hwrnmQumtPw/pics/hwrnmQumtPw114.jpg', 'highlights': ['The chapter covers the basics of writing bash shell scripts, including input, output, variables, math, creating functions, executing Python functions, conditional strings, arrays, and looping.', 'The usage of Vim for editing is explained. The tutorial includes detailed information on how to use Vim, emphasizing its importance in shell scripting.', 'You can customize Vim settings such as displaying line numbers, turning on syntax highlighting, setting tab stops, and enabling auto indent by modifying the .vimrc file in the home directory.', "You can create and execute a script in Vim by entering insert mode, adding a shebang line, writing the script, and saving the file, then changing the file permissions to make it executable with 'chmod 755 filename'.", "Explanation of the installation process for Vim is provided. It guides users through the installation of Vim using 'sudo apt. get install vim' command, ensuring readiness for further usage."]}, {'end': 903.853, 'segs': [{'end': 521.696, 'src': 'embed', 'start': 490.168, 'weight': 0, 'content': [{'end': 495.952, 'text': "I want to make sure you know, whenever you're declaring variables, you can't have white space on either side of your equal sign.", 'start': 490.168, 'duration': 5.784}, {'end': 503.5, 'text': "Now we can also come inside of here and we can declare a constant if we'd like to, even though that isn't very common.", 'start': 496.252, 'duration': 7.248}, {'end': 506.404, 'text': 'And how we do that is declare dash r.', 'start': 503.721, 'duration': 2.683}, {'end': 512.07, 'text': 'And then we can say something like num1 is going to be equal to 5.', 'start': 506.404, 'duration': 5.666}, {'end': 513.652, 'text': 'That is going to make that a constant.', 'start': 512.07, 'duration': 1.582}, {'end': 521.696, 'text': "and let's come in here and create another one called num2 and give that the value of 4, and then you can do some basic arithmetic.", 'start': 514.032, 'duration': 7.664}], 'summary': "When declaring variables, avoid white space around the equal sign. constants declared using 'declare -r'.", 'duration': 31.528, 'max_score': 490.168, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hwrnmQumtPw/pics/hwrnmQumtPw490168.jpg'}, {'end': 664.786, 'src': 'embed', 'start': 639.44, 'weight': 2, 'content': [{'end': 645.002, 'text': "And basically what this is going to mean is let's say we have i plus equals to 2.", 'start': 639.44, 'duration': 5.562}, {'end': 649.964, 'text': 'That is going to be equivalent to i is equal to i plus 2.', 'start': 645.002, 'duration': 4.962}, {'end': 653.705, 'text': "So it's just a shorthand way so you don't have to type in i multiple different times.", 'start': 649.964, 'duration': 3.741}, {'end': 661.223, 'text': "You're also going to have a subtraction option and a multiplication option, as well as a division option.", 'start': 654.059, 'duration': 7.164}, {'end': 663.004, 'text': 'And I think modulus also works.', 'start': 661.243, 'duration': 1.761}, {'end': 664.786, 'text': "I'm not certain, though, because I never use it.", 'start': 663.044, 'duration': 1.742}], 'summary': 'Introduction to shorthand operators for addition, subtraction, multiplication, and division in programming.', 'duration': 25.346, 'max_score': 639.44, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hwrnmQumtPw/pics/hwrnmQumtPw639440.jpg'}, {'end': 711.313, 'src': 'embed', 'start': 683.877, 'weight': 3, 'content': [{'end': 689.38, 'text': "You're also going to be able to use a shorthand way of incrementing values.", 'start': 683.877, 'duration': 5.503}, {'end': 691.221, 'text': "And let's go and create that.", 'start': 689.94, 'duration': 1.281}, {'end': 693.242, 'text': "And let's just go echo.", 'start': 691.521, 'duration': 1.721}, {'end': 694.863, 'text': "And we'll use rand again.", 'start': 693.262, 'duration': 1.601}, {'end': 696.985, 'text': "So we'll have rand++.", 'start': 694.883, 'duration': 2.102}, {'end': 699.186, 'text': "That is the shorthand that I'm referring to.", 'start': 697.045, 'duration': 2.141}, {'end': 703.088, 'text': "And let's see exactly what happens whenever we use this shorthand notation.", 'start': 699.466, 'duration': 3.622}, {'end': 703.948, 'text': 'Go rand++.', 'start': 703.268, 'duration': 0.68}, {'end': 711.313, 'text': "And then also we will change the position of, again, I'm going to hit a V right here and a Y to copy that.", 'start': 705.049, 'duration': 6.264}], 'summary': 'Demonstrates shorthand incrementing with rand++ and copying position with v and y.', 'duration': 27.436, 'max_score': 683.877, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hwrnmQumtPw/pics/hwrnmQumtPw683877.jpg'}, {'end': 794.531, 'src': 'embed', 'start': 769.792, 'weight': 4, 'content': [{'end': 775.818, 'text': "what we're going to have to do here is there's a couple different ways of doing this, but I'm going to show you how to use Python for this.", 'start': 769.792, 'duration': 6.026}, {'end': 784.145, 'text': "So let's go and create number 7 and give it a value of 1.2 and number 8 and give it a value of 3.4.", 'start': 776.138, 'duration': 8.007}, {'end': 789.05, 'text': "You're going to be able to use a whole bunch of different Python commands right here inside of your shell script.", 'start': 784.145, 'duration': 4.905}, {'end': 790.15, 'text': 'and we can go.', 'start': 789.47, 'duration': 0.68}, {'end': 794.531, 'text': "number nine is equal to, and here we're going to call python to execute.", 'start': 790.15, 'duration': 4.381}], 'summary': 'Using python, create numbers 7 and 8 with values 1.2 and 3.4, and execute commands in the shell script.', 'duration': 24.739, 'max_score': 769.792, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hwrnmQumtPw/pics/hwrnmQumtPw769792.jpg'}, {'end': 853.79, 'src': 'embed', 'start': 828.042, 'weight': 5, 'content': [{'end': 833.723, 'text': "and here I'm going to use cat, which is going to print a file or any string that you pass to it,", 'start': 828.042, 'duration': 5.681}, {'end': 835.944, 'text': "and you can experiment with exactly how that's going to work.", 'start': 833.723, 'duration': 2.221}, {'end': 844.907, 'text': "Basically, you're just going to put cat and you're going to put those two little arrows inside of there and then you're going to put how the lines are going to end.", 'start': 836.144, 'duration': 8.763}, {'end': 853.79, 'text': 'and I like to use and some people use other things, and here we can say this text prints and then you put end here at the end again.', 'start': 844.907, 'duration': 8.883}], 'summary': "Using 'cat' to print file or string, experimenting with line endings.", 'duration': 25.748, 'max_score': 828.042, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hwrnmQumtPw/pics/hwrnmQumtPw828042.jpg'}, {'end': 897.871, 'src': 'embed', 'start': 865.923, 'weight': 6, 'content': [{'end': 870.967, 'text': 'using math and printing information out on the screen and using Python and a whole bunch of other different things.', 'start': 865.923, 'duration': 5.044}, {'end': 875.671, 'text': "Now I'm going to jump over and talk about functions and how they work inside of your shell scripts.", 'start': 871.227, 'duration': 4.444}, {'end': 880.915, 'text': 'Now functions are going to, of course, allow you to avoid the need to write duplicate code.', 'start': 876.411, 'duration': 4.504}, {'end': 884.806, 'text': 'and another thing here we have all this stuff typed out here inside of him.', 'start': 881.605, 'duration': 3.201}, {'end': 889.428, 'text': "you're probably wondering is there an easy way to avoid going through and hand deleting all this?", 'start': 884.806, 'duration': 4.622}, {'end': 890.728, 'text': 'of course there is.', 'start': 889.428, 'duration': 1.3}, {'end': 897.871, 'text': "first you want to hit escape, then you're going to hit lowercase g two times and then you're going to hit d and capital g, that is,", 'start': 890.728, 'duration': 7.143}], 'summary': 'Using python to avoid duplicate code and streamline tasks in shell scripts.', 'duration': 31.948, 'max_score': 865.923, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hwrnmQumtPw/pics/hwrnmQumtPw865923.jpg'}], 'start': 458.974, 'title': 'Shell scripting basics and using python in shell scripts', 'summary': 'Covers the basics of shell scripting including variable and constant declaration, arithmetic operations, shorthand arithmetic options, and increment/decrement notation. it also includes using python commands in shell scripts, arithmetic operations, printing information over multiple lines, and introduces the concept of functions.', 'chapters': [{'end': 769.792, 'start': 458.974, 'title': 'Shell scripting basics', 'summary': 'Covers the basics of shell scripting, including variable declaration, constant declaration, basic arithmetic operations, shorthand arithmetic options, and increment/decrement notation, illustrating with examples and explanation.', 'duration': 310.818, 'highlights': ['Variable declaration and naming conventions Variable names start with a letter or underscore, can include numbers, and cannot have whitespace around the equal sign.', "Constant declaration Constants are declared using 'declare -r' and cannot be changed after declaration.", 'Basic arithmetic operations Demonstrated addition, subtraction, multiplication, and division, showcasing the syntax and usage of arithmetic operations.', 'Shorthand arithmetic options Explained shorthand options like plus equals to, subtraction, multiplication, and division, providing a concise way to perform arithmetic operations.', "Increment/decrement notation Illustrated the shorthand way of incrementing values using 'rand++' and explained the difference between pre-increment and post-increment operations."]}, {'end': 903.853, 'start': 769.792, 'title': 'Using python in shell scripts', 'summary': 'Covers using python commands in shell scripts, including arithmetic operations and printing information over multiple lines, and introduces the concept of functions in shell scripts.', 'duration': 134.061, 'highlights': ['The chapter demonstrates using Python commands in shell scripts to perform arithmetic operations and execute Python code, requiring Python to be installed on the system.', "It explains printing information over multiple lines using the 'here script' and the 'cat' command, allowing users to define and print text as desired.", 'The chapter introduces the concept of functions in shell scripts as a way to avoid writing duplicate code and demonstrates a shortcut for deleting text in the script using keyboard commands.']}], 'duration': 444.879, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hwrnmQumtPw/pics/hwrnmQumtPw458974.jpg', 'highlights': ['Variable names start with a letter or underscore, can include numbers, and cannot have whitespace around the equal sign.', "Constants are declared using 'declare -r' and cannot be changed after declaration.", 'Explained shorthand options like plus equals to, subtraction, multiplication, and division, providing a concise way to perform arithmetic operations.', "Illustrated the shorthand way of incrementing values using 'rand++' and explained the difference between pre-increment and post-increment operations.", 'The chapter demonstrates using Python commands in shell scripts to perform arithmetic operations and execute Python code, requiring Python to be installed on the system.', "It explains printing information over multiple lines using the 'here script' and the 'cat' command, allowing users to define and print text as desired.", 'The chapter introduces the concept of functions in shell scripts as a way to avoid writing duplicate code and demonstrates a shortcut for deleting text in the script using keyboard commands.']}, {'end': 1836.978, 'segs': [{'end': 931.881, 'src': 'embed', 'start': 903.853, 'weight': 7, 'content': [{'end': 910.075, 'text': 'in the description i have a link to a cheat sheet that has all of the things i talk about here, so you can use that Now.', 'start': 903.853, 'duration': 6.222}, {'end': 913.88, 'text': "if you want to define a function, you're just going to go and type it in here like this", 'start': 910.075, 'duration': 3.805}, {'end': 916.083, 'text': "Let's just say get date for example.", 'start': 913.96, 'duration': 2.123}, {'end': 923.553, 'text': "And if we want to go and get our current date and time, one of the little functions that's available to us is the date function.", 'start': 916.484, 'duration': 7.069}, {'end': 925.596, 'text': 'And this is going to get the current date and time.', 'start': 923.673, 'duration': 1.923}, {'end': 931.881, 'text': 'and then we can call return, and return is going to return an exit status number between 0 to 255.', 'start': 925.876, 'duration': 6.005}], 'summary': 'Learn to define functions and use date function for current date and time.', 'duration': 28.028, 'max_score': 903.853, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hwrnmQumtPw/pics/hwrnmQumtPw903853.jpg'}, {'end': 994.866, 'src': 'embed', 'start': 963.204, 'weight': 8, 'content': [{'end': 966.527, 'text': 'This is available to every single thing else in your script.', 'start': 963.204, 'duration': 3.323}, {'end': 968.508, 'text': "Now I'm going to show you a local variable.", 'start': 966.787, 'duration': 1.721}, {'end': 970.81, 'text': "So we'll go demonstrate local.", 'start': 968.708, 'duration': 2.102}, {'end': 976.594, 'text': "go and create our little function inside of here and here we're going to define a local variable.", 'start': 971.07, 'duration': 5.524}, {'end': 988.182, 'text': "that means it is only available inside of this function and I'm going to give it the same name as the name outside of there and then we're going to return outside of our function.", 'start': 976.594, 'duration': 11.588}, {'end': 994.866, 'text': "now you would think I just changed the value for name and you're going to see indeed that I did not.", 'start': 988.182, 'duration': 6.684}], 'summary': 'Demonstration of defining a local variable inside a function.', 'duration': 31.662, 'max_score': 963.204, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hwrnmQumtPw/pics/hwrnmQumtPw963204.jpg'}, {'end': 1103.985, 'src': 'embed', 'start': 1078.549, 'weight': 3, 'content': [{'end': 1083.271, 'text': 'we can then come in and we can create the sum of both of these values.', 'start': 1078.549, 'duration': 4.722}, {'end': 1085.453, 'text': "And we're going to add them together.", 'start': 1083.712, 'duration': 1.741}, {'end': 1089.715, 'text': "And we'll go num three, and add and num four.", 'start': 1085.693, 'duration': 4.022}, {'end': 1098.179, 'text': 'And then if we want to pass back the value from our function back to whoever called our function, we can just go echo and some like that.', 'start': 1089.955, 'duration': 8.224}, {'end': 1099.32, 'text': 'Jump out of there.', 'start': 1098.599, 'duration': 0.721}, {'end': 1103.985, 'text': "And then we can define our values we're going to pass inside of here.", 'start': 1099.58, 'duration': 4.405}], 'summary': 'Creating the sum of values and passing it back using a function.', 'duration': 25.436, 'max_score': 1078.549, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hwrnmQumtPw/pics/hwrnmQumtPw1078549.jpg'}, {'end': 1209.539, 'src': 'embed', 'start': 1190.129, 'weight': 4, 'content': [{'end': 1203.136, 'text': "we could also come in here and say how old are you and then whatever they enter is going to be stored inside of the variable called age and then we're going to use an if statement to decide what we want to do here.", 'start': 1190.129, 'duration': 13.007}, {'end': 1209.539, 'text': "so we're just going to type in if and you're going to place your conditions within these brackets like that.", 'start': 1203.136, 'duration': 6.403}], 'summary': "Using a variable 'age' to store user input and make decisions using if statement.", 'duration': 19.41, 'max_score': 1190.129, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hwrnmQumtPw/pics/hwrnmQumtPw1190129.jpg'}, {'end': 1491.641, 'src': 'embed', 'start': 1462.947, 'weight': 5, 'content': [{'end': 1467.949, 'text': "We're also going to be able to use logical operators inside of our shell scripts.", 'start': 1462.947, 'duration': 5.002}, {'end': 1473.752, 'text': 'So we can say something like if and then we want to compound these.', 'start': 1468.029, 'duration': 5.723}, {'end': 1477.894, 'text': "So let's say we want to check if num is greater than zero.", 'start': 1474.052, 'duration': 3.842}, {'end': 1481.015, 'text': 'And we could also use or.', 'start': 1478.754, 'duration': 2.261}, {'end': 1484.237, 'text': 'Or we could also come in here and use not num.', 'start': 1481.576, 'duration': 2.661}, {'end': 1487.299, 'text': 'just like that, just like other computer programming languages.', 'start': 1484.738, 'duration': 2.561}, {'end': 1491.641, 'text': "But here we're going to say that both of these conditions need to be true, not one or the other.", 'start': 1487.539, 'duration': 4.102}], 'summary': "Shell scripts allow the use of logical operators, such as checking if 'num' is greater than zero and using 'or' and 'not' conditions.", 'duration': 28.694, 'max_score': 1462.947, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hwrnmQumtPw/pics/hwrnmQumtPw1462947.jpg'}, {'end': 1546.562, 'src': 'embed', 'start': 1513.422, 'weight': 0, 'content': [{'end': 1515.404, 'text': "So that's how we can use logical operators.", 'start': 1513.422, 'duration': 1.982}, {'end': 1520.53, 'text': "Also, you're going to be able to use logical operators to execute different things.", 'start': 1515.704, 'duration': 4.826}, {'end': 1529.74, 'text': "So let's say we wanted to go and create a file and then if that worked and the file was created, we could then open it up inside of Vim.", 'start': 1520.83, 'duration': 8.91}, {'end': 1535.025, 'text': "So this is kind of silly because you would normally just create the file by opening it in Vim, but I don't know.", 'start': 1529.96, 'duration': 5.065}, {'end': 1540.554, 'text': "so, basically what we're saying here is if we were able to create this file,", 'start': 1535.666, 'duration': 4.888}, {'end': 1546.562, 'text': 'then what we want to do is go and have this file opened up inside of them, and we can do that.', 'start': 1540.554, 'duration': 6.008}], 'summary': 'Using logical operators to execute tasks based on file creation, with a specific example of opening a file in vim.', 'duration': 33.14, 'max_score': 1513.422, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hwrnmQumtPw/pics/hwrnmQumtPw1513422.jpg'}, {'end': 1649.126, 'src': 'embed', 'start': 1619.515, 'weight': 1, 'content': [{'end': 1629.538, 'text': "we'll go string one and let's just have it be nothing, and string two, and let's give it a value of sad string three,", 'start': 1619.515, 'duration': 10.023}, {'end': 1632.138, 'text': "and we'll give it a value of happy.", 'start': 1629.538, 'duration': 2.6}, {'end': 1640.282, 'text': "if we want to test if a string has the value of null and go and put in the string that we want to check and then we'll go then,", 'start': 1632.138, 'duration': 8.144}, {'end': 1649.126, 'text': 'and if this comes back as true, then we know that string one is not null and we can close that off.', 'start': 1640.282, 'duration': 8.844}], 'summary': 'Testing string values for null: string one is not null.', 'duration': 29.611, 'max_score': 1619.515, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hwrnmQumtPw/pics/hwrnmQumtPw1619515.jpg'}, {'end': 1846.591, 'src': 'embed', 'start': 1814.505, 'weight': 2, 'content': [{'end': 1815.866, 'text': 'is it executable?', 'start': 1814.505, 'duration': 1.361}, {'end': 1816.786, 'text': 'D is going to be?', 'start': 1815.866, 'duration': 0.92}, {'end': 1818.667, 'text': 'is it a directory capital L?', 'start': 1816.786, 'duration': 1.881}, {'end': 1820.428, 'text': 'is it a symbolic link P?', 'start': 1818.667, 'duration': 1.761}, {'end': 1821.809, 'text': 'is it a pipe S?', 'start': 1820.428, 'duration': 1.381}, {'end': 1823.71, 'text': 'is it a network socket?', 'start': 1821.809, 'duration': 1.901}, {'end': 1825.611, 'text': 'G like that is?', 'start': 1823.71, 'duration': 1.901}, {'end': 1827.873, 'text': 'is it owned by the group capital O?', 'start': 1825.611, 'duration': 2.262}, {'end': 1830.654, 'text': 'is it owned by the user, and so forth, and so on?', 'start': 1827.873, 'duration': 2.781}, {'end': 1836.978, 'text': 'So those are all the different things you can check in regards to files inside of shell scripting.', 'start': 1830.694, 'duration': 6.284}, {'end': 1840.28, 'text': "And now I'm going to show you how you can use regular expressions as well.", 'start': 1837.298, 'duration': 2.982}, {'end': 1846.591, 'text': "So if you want to check regular expressions, you're going to have to use what is called the extended test.", 'start': 1841.209, 'duration': 5.382}], 'summary': 'Shell scripting can check file properties and use regular expressions with extended test.', 'duration': 32.086, 'max_score': 1814.505, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hwrnmQumtPw/pics/hwrnmQumtPw1814505.jpg'}], 'start': 903.853, 'title': 'Shell scripting functions and logical operators', 'summary': 'Covers defining and using functions, variables, and conditionals in shell scripting, including global and local variables, receiving and returning values, if statements, logical operators, and file and string tests.', 'chapters': [{'end': 1043.041, 'start': 903.853, 'title': 'Functions and variables in shell scripting', 'summary': 'Covers defining functions, using global and local variables, and understanding the behavior of variables within functions in shell scripting.', 'duration': 139.188, 'highlights': ["Defining functions by using the 'function_name()' syntax and calling them to execute the defined code.", 'Understanding the difference between global and local variables and their availability within the script.', 'Explaining the behavior of variables within functions, demonstrating the concept with examples.']}, {'end': 1513.422, 'start': 1043.041, 'title': 'Shell scripting functions and conditionals', 'summary': 'Covers creating functions to receive and return values, using if statements for conditionals and receiving user input, and demonstrates various condition checks for number comparison and logical operations, including extended integer tests.', 'duration': 470.381, 'highlights': ['In-shell function creation and usage: Demonstrated the creation and usage of a function to receive and return values, with the example showcasing a function to calculate and return the sum of two values using local variables and echoing the result.', "User input and if statement usage: Illustrated the process of receiving user input and utilizing if statements for conditionals, including checking the user's age to determine driving eligibility and demonstrating the syntax for if, else if, and else statements.", "Number comparison and extended integer tests: Showcased various methods of number comparison using if statements, including equal to, greater than, less than, and extended integer tests, as well as logical operations such as 'and' and 'not' for compound conditions.", "Variable comparison and logical operations: Demonstrated the usage of logical operators such as 'or' and 'not' for compound conditions, showcasing their application in checking if a variable is between specific ranges and illustrating the output based on the comparison."]}, {'end': 1836.978, 'start': 1513.422, 'title': 'Using logical operators in shell scripting', 'summary': 'Explains the use of logical operators in shell scripting, including creating and checking files and directories as well as testing strings and file attributes.', 'duration': 323.556, 'highlights': ["Explaining the use of logical operators and file creation The chapter discusses using logical operators to execute different actions, such as creating a file and opening it in Vim, and checking for the existence of a sample directory and creating it if it doesn't exist.", 'Testing strings and their values The transcript covers testing strings for null values, non-null values, and equality, demonstrating various string comparison operations.', 'Checking file attributes in shell scripting The chapter provides a comprehensive overview of checking file attributes, including existence, type (e.g., normal file, readable, writable, executable, etc.), ownership, and other properties in shell scripting.']}], 'duration': 933.125, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hwrnmQumtPw/pics/hwrnmQumtPw903853.jpg', 'highlights': ["Explaining the use of logical operators and file creation The chapter discusses using logical operators to execute different actions, such as creating a file and opening it in Vim, and checking for the existence of a sample directory and creating it if it doesn't exist.", 'Testing strings and their values The transcript covers testing strings for null values, non-null values, and equality, demonstrating various string comparison operations.', 'Checking file attributes in shell scripting The chapter provides a comprehensive overview of checking file attributes, including existence, type (e.g., normal file, readable, writable, executable, etc.), ownership, and other properties in shell scripting.', 'In-shell function creation and usage: Demonstrated the creation and usage of a function to receive and return values, with the example showcasing a function to calculate and return the sum of two values using local variables and echoing the result.', "User input and if statement usage: Illustrated the process of receiving user input and utilizing if statements for conditionals, including checking the user's age to determine driving eligibility and demonstrating the syntax for if, else if, and else statements.", "Number comparison and extended integer tests: Showcased various methods of number comparison using if statements, including equal to, greater than, less than, and extended integer tests, as well as logical operations such as 'and' and 'not' for compound conditions.", "Variable comparison and logical operations: Demonstrated the usage of logical operators such as 'or' and 'not' for compound conditions, showcasing their application in checking if a variable is between specific ranges and illustrating the output based on the comparison.", "Defining functions by using the 'function_name()' syntax and calling them to execute the defined code.", 'Understanding the difference between global and local variables and their availability within the script.', 'Explaining the behavior of variables within functions, demonstrating the concept with examples.']}, {'end': 2848.838, 'segs': [{'end': 1889.702, 'src': 'embed', 'start': 1860.616, 'weight': 6, 'content': [{'end': 1863.217, 'text': 'store whatever they type in inside of date.', 'start': 1860.616, 'duration': 2.601}, {'end': 1865.217, 'text': 'And then we can create a pattern.', 'start': 1863.477, 'duration': 1.74}, {'end': 1867.578, 'text': "I'm not going to get that much into regular expressions.", 'start': 1865.337, 'duration': 2.241}, {'end': 1868.958, 'text': 'I already did a tutorial on that.', 'start': 1867.618, 'duration': 1.34}, {'end': 1871.419, 'text': "You can look on my YouTube channel if you'd like to check that out.", 'start': 1868.998, 'duration': 2.421}, {'end': 1880.261, 'text': "So let's say we wanted to make sure that they enter in a group of numbers between 0 and 9 and that they provide at least 8 of them.", 'start': 1871.659, 'duration': 8.602}, {'end': 1882.722, 'text': "And we're going to say that that verifies it is a date.", 'start': 1880.341, 'duration': 2.381}, {'end': 1886.163, 'text': "And we put the question mark here for saying that's the end of the pattern we're looking for.", 'start': 1882.742, 'duration': 3.421}, {'end': 1889.702, 'text': "And the caret says this is the beginning of the pattern we're looking for.", 'start': 1886.781, 'duration': 2.921}], 'summary': 'Store user input in date, verify as date with at least 8 numbers.', 'duration': 29.086, 'max_score': 1860.616, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hwrnmQumtPw/pics/hwrnmQumtPw1860616.jpg'}, {'end': 1964.883, 'src': 'embed', 'start': 1942.655, 'weight': 7, 'content': [{'end': 1951.16, 'text': 'And if we want to allow them to enter in multiple different numbers, we can just go num1 and num2 without putting any commas inside of there.', 'start': 1942.655, 'duration': 8.505}, {'end': 1962.422, 'text': 'and then we can of course come in and sum these values, num1 plus num2, and then we can echo out on the screen this information and there we go,', 'start': 1951.5, 'duration': 10.922}, {'end': 1964.883, 'text': 'enter two numbers to sum and we can say 23.', 'start': 1962.422, 'duration': 2.461}], 'summary': 'Demonstrating how to sum two numbers without using commas, resulting in sum of 23.', 'duration': 22.228, 'max_score': 1942.655, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hwrnmQumtPw/pics/hwrnmQumtPw1942655.jpg'}, {'end': 2018.022, 'src': 'embed', 'start': 1986.518, 'weight': 8, 'content': [{'end': 1994.149, 'text': "Let's say that we wanted them to be able to enter information, however, we don't want it to be displayed on the screen whenever they enter it.", 'start': 1986.518, 'duration': 7.631}, {'end': 1996.7, 'text': 'We would just go read and SP.', 'start': 1994.537, 'duration': 2.163}, {'end': 1998.382, 'text': 'The P is for prompt once again.', 'start': 1996.78, 'duration': 1.602}, {'end': 2000.445, 'text': "And we'll say, and the S is for secret.", 'start': 1998.402, 'duration': 2.043}, {'end': 2003.789, 'text': "And we'll say, enter the secret code.", 'start': 2000.585, 'duration': 3.204}, {'end': 2007.354, 'text': "And we're going to store that inside of variable secret.", 'start': 2004.23, 'duration': 3.124}, {'end': 2008.576, 'text': 'And then we could say if.', 'start': 2007.675, 'duration': 0.901}, {'end': 2018.022, 'text': 'Secret is equal to password, then we go echo enter, else wrong password.', 'start': 2009.717, 'duration': 8.305}], 'summary': "Users can input a secret code, stored in 'secret' variable. if correct, 'enter' echoed.", 'duration': 31.504, 'max_score': 1986.518, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hwrnmQumtPw/pics/hwrnmQumtPw1986518.jpg'}, {'end': 2075.813, 'src': 'embed', 'start': 2050.38, 'weight': 9, 'content': [{'end': 2060.324, 'text': 'what we can do is we can store what we want to define as the separation for the attributes that are passed inside of ourselves our shell script.', 'start': 2050.38, 'duration': 9.944}, {'end': 2065.967, 'text': 'but what we want to do here and what, how we do that is we go and change what is called the ifs.', 'start': 2060.324, 'duration': 5.643}, {'end': 2075.813, 'text': "now what we're going to do here is we want to input or first save the original version of IFS, because that could be useful as our script continues.", 'start': 2065.967, 'duration': 9.846}], 'summary': 'Change ifs to define attribute separation in shell script.', 'duration': 25.433, 'max_score': 2050.38, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hwrnmQumtPw/pics/hwrnmQumtPw2050380.jpg'}, {'end': 2285.284, 'src': 'embed', 'start': 2259.675, 'weight': 0, 'content': [{'end': 2268.058, 'text': "Also, we could come in and we'll go sample string to explain what I did whenever I replaced all of the blank spaces with nothing.", 'start': 2259.675, 'duration': 8.383}, {'end': 2269.778, 'text': "Here I'll do a sample string.", 'start': 2268.318, 'duration': 1.46}, {'end': 2278.222, 'text': "If I then wanted to output different information, let's say I wanted to change that string to cat, I would use a parameter expansion again.", 'start': 2270.099, 'duration': 8.123}, {'end': 2280.082, 'text': 'And I would go sample string.', 'start': 2278.242, 'duration': 1.84}, {'end': 2285.284, 'text': 'And I would say I want to replace dog with cat inside of the string.', 'start': 2280.382, 'duration': 4.902}], 'summary': 'Demonstrated string manipulation and parameter expansion to replace text in a sample string.', 'duration': 25.609, 'max_score': 2259.675, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hwrnmQumtPw/pics/hwrnmQumtPw2259675.jpg'}, {'end': 2347.091, 'src': 'embed', 'start': 2320.483, 'weight': 1, 'content': [{'end': 2326.968, 'text': "well, if I put just a line like that, it's just going to print out, Derek, if a value for name doesn't already exist.", 'start': 2320.483, 'duration': 6.485}, {'end': 2333.612, 'text': "If, however, a value for name does exist, it's going to change the value to it with the equals sign.", 'start': 2327.648, 'duration': 5.964}, {'end': 2336.134, 'text': 'So you can play around with that and see how that works out for you.', 'start': 2333.693, 'duration': 2.441}, {'end': 2341.418, 'text': "And now I'm going to jump in and show you exactly how we can use case inside of shell scripts.", 'start': 2336.414, 'duration': 5.004}, {'end': 2347.091, 'text': "Okay, so the very first thing I'm going to do here is I'm going to ask the user how old are they?", 'start': 2342.346, 'duration': 4.745}], 'summary': 'Demonstrating usage of case inside shell scripts and asking user for their age.', 'duration': 26.608, 'max_score': 2320.483, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hwrnmQumtPw/pics/hwrnmQumtPw2320483.jpg'}, {'end': 2459.03, 'src': 'embed', 'start': 2436.462, 'weight': 2, 'content': [{'end': 2444.226, 'text': "like that, let's go to the next line, star, and here we'll say something like echo, you are too old for school and close that off.", 'start': 2436.462, 'duration': 7.764}, {'end': 2448.547, 'text': "And then you're going to type in E S A C to end the case.", 'start': 2444.446, 'duration': 4.101}, {'end': 2454.689, 'text': 'And before we execute that, might as well show you the last conditional, which is the ternary operator.', 'start': 2449.087, 'duration': 5.602}, {'end': 2459.03, 'text': 'And the ternary operator is going to perform different actions based on conditions.', 'start': 2455.209, 'duration': 3.821}], 'summary': 'Demonstrating coding concepts, including ternary operator and conditional statements.', 'duration': 22.568, 'max_score': 2436.462, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hwrnmQumtPw/pics/hwrnmQumtPw2436462.jpg'}, {'end': 2552.17, 'src': 'embed', 'start': 2518.137, 'weight': 3, 'content': [{'end': 2522.118, 'text': "Now I'm going to take another look at parameter expansions and strings.", 'start': 2518.137, 'duration': 3.981}, {'end': 2527.56, 'text': "Okay, now I'm going to show you what we can do with parameter expansions in regards to strings.", 'start': 2522.958, 'duration': 4.602}, {'end': 2534.282, 'text': "So let's say we have random string, and it's just going to be a random string.", 'start': 2527.8, 'duration': 6.482}, {'end': 2540.545, 'text': "And let's say we wanted to get the string length, which could be useful for numerous different reasons.", 'start': 2534.583, 'duration': 5.962}, {'end': 2552.17, 'text': 'So String link and you would just go dollar sign and curly bracket and hash and then put in whatever your string name is and then close it off with a curly bracket.', 'start': 2540.725, 'duration': 11.445}], 'summary': 'Demonstration of getting string length using parameter expansions.', 'duration': 34.033, 'max_score': 2518.137, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hwrnmQumtPw/pics/hwrnmQumtPw2518137.jpg'}, {'end': 2829.464, 'src': 'embed', 'start': 2801.966, 'weight': 4, 'content': [{'end': 2805.088, 'text': "So there's a couple of different ways we can use while loops.", 'start': 2801.966, 'duration': 3.122}, {'end': 2810.592, 'text': "Now let's come in here and take a look at until, which is basically the opposite of while loop.", 'start': 2805.569, 'duration': 5.023}, {'end': 2816.376, 'text': "Basically, with a while loop, we're saying we're going to continue doing something as long as a condition is true.", 'start': 2810.732, 'duration': 5.644}, {'end': 2824.542, 'text': "and with a until we're going to continue doing something until a condition is true, so it's just slightly different.", 'start': 2817.02, 'duration': 7.522}, {'end': 2829.464, 'text': "and to use until, let's just use num again and we're going to say greater than 10.", 'start': 2824.542, 'duration': 4.922}], 'summary': 'Comparing while and until loops for control flow, using num > 10.', 'duration': 27.498, 'max_score': 2801.966, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hwrnmQumtPw/pics/hwrnmQumtPw2801966.jpg'}], 'start': 1837.298, 'title': 'Shell scripting fundamentals', 'summary': 'Covers basic and advanced shell scripting techniques including regular expressions, attribute separation, string operations, and looping in bash, with practical examples and use cases.', 'chapters': [{'end': 2032.992, 'start': 1837.298, 'title': 'Shell scripting basics', 'summary': 'Covers the basics of shell scripting, including the use of regular expressions for validation, reading multiple values, and accepting secret inputs, and demonstrates how to use these functionalities to create scripts that validate dates and perform arithmetic operations on multiple numbers.', 'duration': 195.694, 'highlights': ['The chapter demonstrates using regular expressions to validate input, such as ensuring that a user enters a group of numbers between 0 and 9, and provides at least 8 of them.', 'It explains how to read multiple values inside shell scripts, allowing for the entry of two numbers to sum without using commas and accepting multiple different pieces of output.', 'The chapter also covers accepting secret inputs without displaying them on the screen, showcasing how to prompt users to enter a secret code and validating it without revealing the input.']}, {'end': 2518.117, 'start': 2032.992, 'title': 'Shell scripting techniques', 'summary': 'Covers storing attribute separation, input values, parameter expansion, and conditional operations in shell scripting, showcasing examples and practical use cases.', 'duration': 485.125, 'highlights': ['Using IFS to define separation for input values in shell script The speaker explains how to store the separation for input attributes by using IFS, illustrating the process with examples and demonstrating the practical use case.', 'Demonstrating parameter expansion in shell scripting The speaker provides examples and practical applications of parameter expansion in shell scripting, including replacing white spaces and modifying strings to showcase its functionality.', 'Illustrating the usage of case statement in shell scripts The chapter demonstrates the use of case statements in shell scripts to execute different code based on the value of a variable, with clear examples and practical scenarios.', 'Explaining the ternary operator in shell scripting The speaker explains and demonstrates the usage of the ternary operator in shell scripting, showcasing how it performs different actions based on conditions with a practical example.']}, {'end': 2848.838, 'start': 2518.137, 'title': 'Parameter expansions, string operations, and looping in bash', 'summary': 'Covers parameter expansions for string manipulation, including getting string length, slicing, and demonstrating while and until loops in bash.', 'duration': 330.701, 'highlights': ['The chapter covers parameter expansions for string manipulation Detailed explanation of using parameter expansions for manipulating strings is provided.', 'Demonstrating while and until loops in Bash Comprehensive demonstration of while and until loops, including examples and explanations.', 'Getting string length, slicing, and operations in Bash Explanation of obtaining string length, performing slicing, and operations in Bash are covered.']}], 'duration': 1011.54, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hwrnmQumtPw/pics/hwrnmQumtPw1837298.jpg', 'highlights': ['Demonstrating parameter expansion in shell scripting The speaker provides examples and practical applications of parameter expansion in shell scripting, including replacing white spaces and modifying strings to showcase its functionality.', 'Illustrating the usage of case statement in shell scripts The chapter demonstrates the use of case statements in shell scripts to execute different code based on the value of a variable, with clear examples and practical scenarios.', 'Explaining the ternary operator in shell scripting The speaker explains and demonstrates the usage of the ternary operator in shell scripting, showcasing how it performs different actions based on conditions with a practical example.', 'The chapter covers parameter expansions for string manipulation Detailed explanation of using parameter expansions for manipulating strings is provided.', 'Demonstrating while and until loops in Bash Comprehensive demonstration of while and until loops, including examples and explanations.', 'Getting string length, slicing, and operations in Bash Explanation of obtaining string length, performing slicing, and operations in Bash are covered.', 'The chapter demonstrates using regular expressions to validate input, such as ensuring that a user enters a group of numbers between 0 and 9, and provides at least 8 of them.', 'It explains how to read multiple values inside shell scripts, allowing for the entry of two numbers to sum without using commas and accepting multiple different pieces of output.', 'The chapter also covers accepting secret inputs without displaying them on the screen, showcasing how to prompt users to enter a secret code and validating it without revealing the input.', 'Using IFS to define separation for input values in shell script The speaker explains how to store the separation for input attributes by using IFS, illustrating the process with examples and demonstrating the practical use case.']}, {'end': 3550.457, 'segs': [{'end': 2911.897, 'src': 'embed', 'start': 2870.896, 'weight': 0, 'content': [{'end': 2878.182, 'text': "Well the file that I'm going to use in this situation is going to be my Barry Bonds stats and he's a baseball player if you didn't know.", 'start': 2870.896, 'duration': 7.286}, {'end': 2882.985, 'text': "And it's going to have his batting average, his RBIs, and his total number of home runs inside here.", 'start': 2878.402, 'duration': 4.583}, {'end': 2888.067, 'text': 'So what I want to do is I want to go and I want to loop through all that Barry Bonds data.', 'start': 2883.005, 'duration': 5.062}, {'end': 2889.268, 'text': "So we're going to come in.", 'start': 2888.368, 'duration': 0.9}, {'end': 2892.69, 'text': "Once again, we're going to jump into this, just using Hello World again.", 'start': 2889.588, 'duration': 3.102}, {'end': 2895.992, 'text': "And I'm going to say that I want to use a while loop here.", 'start': 2892.71, 'duration': 3.282}, {'end': 2898.913, 'text': 'And I want to read information.', 'start': 2896.492, 'duration': 2.421}, {'end': 2905.175, 'text': "And the information is going to be average, RBIs, home runs, and then I'm going to say do.", 'start': 2899.313, 'duration': 5.862}, {'end': 2909.116, 'text': "Now in this situation, I'm going to show you another way that we can output information.", 'start': 2905.515, 'duration': 3.601}, {'end': 2911.897, 'text': "I'm going to use printf in this situation.", 'start': 2909.136, 'duration': 2.761}], 'summary': "Analyzing barry bonds' stats using loops and printf.", 'duration': 41.001, 'max_score': 2870.896, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hwrnmQumtPw/pics/hwrnmQumtPw2870896.jpg'}, {'end': 3022.119, 'src': 'embed', 'start': 2994.86, 'weight': 4, 'content': [{'end': 3001.005, 'text': "So here what we're going to do is we're going to continue cycling through this as long as i is less than or equal to 10.", 'start': 2994.86, 'duration': 6.145}, {'end': 3008.41, 'text': 'And we are going to also come in here and increment the value of i each time it jumps through our loop.', 'start': 3001.005, 'duration': 7.405}, {'end': 3009.391, 'text': 'Close that off.', 'start': 3008.57, 'duration': 0.821}, {'end': 3011.492, 'text': "Again, we're going to type in do.", 'start': 3009.711, 'duration': 1.781}, {'end': 3013.954, 'text': "And I'll just keep this nice and simple once again.", 'start': 3011.892, 'duration': 2.062}, {'end': 3016.095, 'text': "And I'll put the information there.", 'start': 3013.974, 'duration': 2.121}, {'end': 3018.036, 'text': 'And you close the for loop like that.', 'start': 3016.395, 'duration': 1.641}, {'end': 3022.119, 'text': 'And we can also come in and cycle through ranges with for loops.', 'start': 3018.497, 'duration': 3.622}], 'summary': 'Cycling through a for loop with i <= 10 and incrementing i each time.', 'duration': 27.259, 'max_score': 2994.86, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hwrnmQumtPw/pics/hwrnmQumtPw2994860.jpg'}, {'end': 3081.606, 'src': 'embed', 'start': 3056.877, 'weight': 1, 'content': [{'end': 3067.5, 'text': "Now, the one thing with bash arrays is that you're only ever going to be able to have one dimensional arrays inside of bashes and of course the indexes are going to start at zero unless you define you want them to start something else.", 'start': 3056.877, 'duration': 10.623}, {'end': 3075.582, 'text': 'So I can come in here and create an array just call it favorite numbers very easy and we can go 3.14 again you do not put commas inside of here.', 'start': 3067.86, 'duration': 7.722}, {'end': 3081.606, 'text': 'two, seven, eight and five, seven, seven, two, one and what other number do we have here?', 'start': 3075.902, 'duration': 5.704}], 'summary': 'Bash arrays are one-dimensional with zero-based indexing and can be easily created with values like 3.14, 2, 7, 8, 5, 7, 7, 2, 1.', 'duration': 24.729, 'max_score': 3056.877, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hwrnmQumtPw/pics/hwrnmQumtPw3056877.jpg'}, {'end': 3274.653, 'src': 'heatmap', 'start': 3230.144, 'weight': 1, 'content': [{'end': 3233.826, 'text': 'And to do that, once again, curly bracket, favorite nums.', 'start': 3230.144, 'duration': 3.682}, {'end': 3237.209, 'text': "And let's say we want to get the length of the individual element there.", 'start': 3234.387, 'duration': 2.822}, {'end': 3238.35, 'text': 'And we can do that.', 'start': 3237.549, 'duration': 0.801}, {'end': 3242.152, 'text': "We're also going to be able to come in here and sort our array.", 'start': 3238.57, 'duration': 3.582}, {'end': 3244.293, 'text': "So we'll say sorted nums.", 'start': 3242.212, 'duration': 2.081}, {'end': 3247.395, 'text': 'And how we would do that is go dollar sign.', 'start': 3244.793, 'duration': 2.602}, {'end': 3252.517, 'text': 'And then we go for I in and then dollar sign.', 'start': 3247.695, 'duration': 4.822}, {'end': 3254.018, 'text': 'Favorite nums.', 'start': 3252.697, 'duration': 1.321}, {'end': 3256.9, 'text': 'And then an at sign inside of there.', 'start': 3254.558, 'duration': 2.342}, {'end': 3259.421, 'text': 'A curly bracket closing like this.', 'start': 3257.16, 'duration': 2.261}, {'end': 3266.046, 'text': "and then, whoops, don't forget to put semicolon inside of there, and then we'll go do and we can go.", 'start': 3259.921, 'duration': 6.125}, {'end': 3267.807, 'text': 'echo and dollar sign.', 'start': 3266.046, 'duration': 1.761}, {'end': 3274.653, 'text': "i and you can i don't know if i mentioned this before you can put semicolons in here, but not necessarily do you need to do that.", 'start': 3267.807, 'duration': 6.846}], 'summary': 'Manipulating and sorting array elements using code and methods.', 'duration': 44.509, 'max_score': 3230.144, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hwrnmQumtPw/pics/hwrnmQumtPw3230144.jpg'}, {'end': 3411.595, 'src': 'embed', 'start': 3386.975, 'weight': 2, 'content': [{'end': 3392.978, 'text': "Now let's take a look at positional parameters and how we're able to accept values from the command line.", 'start': 3386.975, 'duration': 6.003}, {'end': 3401.003, 'text': 'Okay, so positional parameters are variables that can store data on the command line in variable names 0 through 9.', 'start': 3393.695, 'duration': 7.308}, {'end': 3407.611, 'text': 'However, the variable 0 is always going to contain the path to the executed script.', 'start': 3401.003, 'duration': 6.608}, {'end': 3411.595, 'text': "So for the most part, you're going to be working with 1 through 9.", 'start': 3407.991, 'duration': 3.604}], 'summary': 'Positional parameters store command line values in variables 0-9, with variable 0 containing the script path.', 'duration': 24.62, 'max_score': 3386.975, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hwrnmQumtPw/pics/hwrnmQumtPw3386975.jpg'}], 'start': 2849.398, 'title': 'Using while loop and shell scripting basics with bash', 'summary': "Demonstrates using a while loop to read and output information from a file containing barry bonds' baseball statistics, and covers working with for loops, creating and manipulating arrays, accessing positional parameters, and summing values from the command line in shell scripting using bash, with practical examples and explanations.", 'chapters': [{'end': 2973.262, 'start': 2849.398, 'title': 'Using while loop to read and output file information', 'summary': "Demonstrates using a while loop to read and output information from a file, specifically showcasing the process of extracting and displaying data from a file containing barry bonds' baseball statistics.", 'duration': 123.864, 'highlights': ["Using a while loop to read and output information from a file The while loop is used to read and display information from a file, exemplified by extracting and displaying data from a file containing Barry Bonds' baseball statistics.", 'Utilizing printf to format and display data The printf function is employed to format and display data, showcasing the extraction and output of specific information such as batting average, RBIs, and home runs from the file.', "Executing the script to extract and display file information The script is executed to extract and display information from the designated file, demonstrating the successful retrieval and output of data related to Barry Bonds' baseball statistics."]}, {'end': 3550.457, 'start': 2973.582, 'title': 'Shell scripting basics with bash', 'summary': 'Covers working with for loops, creating and manipulating arrays, accessing positional parameters, and summing values from the command line in shell scripting using bash, with practical examples and explanations.', 'duration': 576.875, 'highlights': ['Working with for loops in shell scripting Explaining the C style way of working with for loop, cycling through the loop as long as i is less than or equal to 10, and printing out the values of 0 through 10.', 'Creating and manipulating arrays in Bash Demonstrating the creation of arrays, accessing array elements, adding values, outputting all array values using for loops, and sorting an array with practical examples.', 'Accessing positional parameters and summing values from the command line Explanation of accessing names past 9, accepting values from the command line, and summing all the values entered from the command line with practical examples and explanations.']}], 'duration': 701.059, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hwrnmQumtPw/pics/hwrnmQumtPw2849398.jpg', 'highlights': ["Using a while loop to read and output information from a file containing Barry Bonds' baseball statistics.", 'Creating and manipulating arrays in Bash with practical examples.', 'Accessing positional parameters and summing values from the command line with practical examples and explanations.', 'Utilizing printf to format and display data, showcasing the extraction and output of specific information such as batting average, RBIs, and home runs from the file.', 'Working with for loops in shell scripting, cycling through the loop and printing out the values of 0 through 10.']}], 'highlights': ['The chapter covers the basics of writing bash shell scripts, including input, output, variables, math, creating functions, executing Python functions, conditional strings, arrays, and looping.', 'The usage of Vim for editing is explained. The tutorial includes detailed information on how to use Vim, emphasizing its importance in shell scripting.', "Explaining the use of logical operators and file creation The chapter discusses using logical operators to execute different actions, such as creating a file and opening it in Vim, and checking for the existence of a sample directory and creating it if it doesn't exist.", 'Demonstrating parameter expansion in shell scripting The speaker provides examples and practical applications of parameter expansion in shell scripting, including replacing white spaces and modifying strings to showcase its functionality.', "Using a while loop to read and output information from a file containing Barry Bonds' baseball statistics."]}