Linux BASH Shell Script Basics Part 2
![*](https://i0.wp.com/allprowebdesigns.com/wp-content/uploads/2024/01/1704692680_maxresdefault.jpg?resize=840%2C430&ssl=1)
Video Title: Linux BASH Shell Script Basics Part 2
Greetings and salutations and welcome to the second video in our series called Linux bash shell script basics in the first video you learned what bash was what a bash script was how to write a bash script how to make it executable how to test it and where to put it on
Your machine to make it useful at the end of that video you had enough knowledge to be able to write a very simple script with one command after another and those kinds of scripts can be very powerful but in this video we’re going to talk about some of the
Underlying basics of the shell some of the things that you can tap into to make your scripts more clever and run in a less linear fashion we are heading in a direction where we’re going from a simple script to more like a real computer program so let’s just jump
Right into it the first thing that we want to talk about is standard in standard out and standard error and what redirection is redirections in linux is when you’re executing a command you can change where the input and output goes the devices and we’re talking about virtual devices in some
Cases but a device would be anywhere that you would send input or output the basic workflow of any command is just to take input from somewhere do something to it and then put it out as output so the standard channels that we work with our standard input known as standard in
And that’s usually the keyboard you just type standard out is usually the screen and then we have another one called standard error which is just for error messages and the reason why it’s done that way is because sometimes the output from a command is being sent into a file
Or into another command and in that case we won’t see it on the screen if our error message is mixed in with that so having another channel just for error messages means that we can see if an error happens and the command can still run so that’s just something to keep in
Mind when you get to a point when you start writing scripts that are sophisticated enough to have of error messages in them with redirection the above standard input/output can be changed the first thing that you can do is use a pipe to send output into a program and I have an
Example up there we’re gonna we’re gonna actually run that and see how it works so we’re going to use LS and we’re gonna do the long option on LS and let us work with let’s do document documents in my home directory there’s a lot of stuff in
There right so if I just turn this loose like this you notice it runs off the screen I mean we have a whole list that goes up here well it would be a lot easier if we piped this into less which is a pager and then with less you can
Just go up one line at a time if you want to and exit out and you’re done so that’s one way to redirect output the other way to do it is to send it into a file and to do that to use that little redirection character right there which
Is just saying hey I want you to send this output into where I tell you tell you to send it and we’re gonna call it LS output and we’ll be all formal and put dot txt on the end how’s that so now we’re gonna run that command and you
Notice we didn’t get anything on the screen that’s because everything went in there so let’s use less once again to open up that particular file and you’ll see that we have a whole bunch of stuff in here it’s all the crap that’s in my document directory so clear the screen
Queue to get out of less and then clear the screen so another thing that we can do is we can run the same command and this time we can throw the output away and you do it exactly the same way but this time we’re gonna send it to a
Special virtual device on the machine called dev nul and Devon all is the bitbucket it’s the trash can in the system any output from any command that you don’t want to appear on the screen or go some other place you send here and you might be thinking to yourself why is that useful
Well sometimes you run a command only to get its exit status sometimes you run a command only to perform some function and you don’t care about its output and you don’t want it to go let’s say into a system email which will end in the root
Users end up in the root users directory or someplace like that and that can happen when you’re doing like cron jobs and things like that so that’s what Devon all does it allows you to just send any unwanted crap that you don’t want to go somewhere into the bit bucket
And it absolutely disappears so let’s jump back up here and see if there’s anything else that we need to add to that well I do want to add here that you’ll notice at the end of this example right here that you have this little set of stuff here where we have an extra
Redirect so it says – is redirected into one there well what that means is that that Devon all will catch error messages from the command that’s running in front of it as well in other words everything’s gonna go into the pit bucket and that’s important to understand when you’re really wanting to
Get rid of all of the output so you can send an error message to standard error and it looks like this of course if you run this command on the screen what you’re gonna get let’s see we’ll just do that just I just to prove really you
Know drive a point home here let’s go ahead and put that in there you’ll see that it comes up and it says this is an error message you’re still seeing it on the screen that’s because the second channel the standard error channel still shows on the screen but you can also
Redirect standard error into a file let’s say if you have a log you’re trying to catch errors that sort of thing very flexible when you’re dealing with that so that’s the basics of standard input and output and it’s it’s something that makes unix-like systems which is what Linux is
Extremely powerful because we can take a lot of really small tools and we can daisy chain them together to do very powerful things and that is called the unix way and linux is a system that is a unix work alike so in linux we talked a
Lot about the unix way as well moving on now next concept we’re going to deal with is variables a variable is a character string which basically just means it’s some sort of data it could be anything can be a number can be text a file name it can be a device location it
Doesn’t even matter what it is the output of a command any kind of data can be put into a variable and the variables are extremely useful so when your system boots up and you open up a terminal there are all of these variables that are already set and they’re set in there
Sitting in memory ready to rock and roll and you can get a hold of them and that’s the first thing that I’m going to show you is the memory so let’s go ahead and clear this screen and what’s in the memory in a standard environment okay so
When your system boots up there’s all these configuration files that it goes through and it sets these variables this is what it looks like now right now it might not look like that this is a bunch of useful information but if you start kind of scrolling through the list here
You see we got some really useful stuff let’s see here there’s my home directory right there under a variable that’s simply called home so we can scroll down through here my username is in here as well we have a login name which is kind of the same
Thing but a little bit different here’s the path statement that we talked about in the first video right there so that is in a variable that’s sitting in the system so you have all kinds of really cool little bits of information that you can grab now what makes this useful is
That here’s where we’re starting to get into the concept of portability when it comes to scripts so if I want to write a script that runs on my machine and I have to access my home directory I could write the script where I would put my direct path to my
Absolute path to my home directory in there which would be slash home Joe whatever problem is that if I give that script to you and you try and run it on your system that doesn’t work unless your user name happens to be Joe right we can use the variable in this
Situation to match any user anywhere because standard bash is that that variable will be whatever username is running it so that’s what shell variables are all about there’s a whole whole bunch of them to work with we can set variables quite easy it’s it’s just
Silly easy to do so let’s set an area variable right now and it’s a equals B there’s our variable our variable is set if you want to see what’s in a variable no problem whatsoever we use the echo command variables always start with a dollar sign and we’re gonna look in
What’s in variable a and you see that we have that information that we put in there called B you want to get rid of a variable we can unset a variable and just unset this variable which is going to be a alright so if we run this
Command again we were supposed to unset that there we go so we don’t need the dollar sign there seeing if I would looked at my own notes I wouldn’t have made that error but nobody’s perfect let’s see here what else do we need to talk about with variables I used this particular
Example right there when I was putting that together so you’ve seen pretty much everything there is to see about variables but then we have some special variables that we need to talk about and these are a little harder to demonstrate so we won’t be demonstrating them but
What we will do is we’ll talk about them here looking at the well you’ll see this in action and scripts later but I can’t show it to you that easily in a terminal let’s put it that way so any input a user adds after a command is placed in a
Special variable called arguments all right and and the arguments are whatever you type in and they’re separated by a space so when you type a string a command in there which is a string of data you have the command name which would be the first one and then you
Would have the arguments after that so argument one would be the first file argument two would be file two and file three also it works with options so if you were trying to get an option out of something and you put it in there there’s your argument right there so
These variables are set up every time you fire off a command in the system and you use this within your own script to be able to figure out what users put in to access different options and we’re just gonna stick that little feather in our cap we’ll see how that works later
On in the series and it’ll it’ll make more sense later there’s a special share very shell variable that is the @ sign and it represents all of the arguments in order from 0 on up so you could have 10 if you wanted to and what this does
Is it allows you to access those arguments in an order for instance you may have a loop command of some sort you want to do something for each thing that a user puts in let’s say their file name or something like that well that’s how you would access that so when you have
All this information that you can stick into variables now we get into doing something very useful and that is tests and tests are how we make clever scripts that know what’s going on as they’re executing they know what’s going on with the system or what the user has put into
The system there is a million ways to use tests and they very often go along with Arctic with variables what we want or arguments actually – what we want to do is just check to see if a piece of information is there tests can also be
Used to see if files exist so let’s go ahead and look at a simple test command we’re going to use our variable again so what we’re going to do is we’re going to go ahead and do our original deal there where we created a variable you know a
Equals B and we’re gonna test to see if that’s true so the command would be test and then we want to test this variable so we want to make sure that a is equal to 2 equals in a row therefore this syntax put this in quotes B is what we’re looking for
And now when we run this we’re not gonna get any output I mean if I just run they’re not seeing anything on the screen so what we’re gonna do is use a trick we’re gonna use the exit code which is another kind of variable that
Is set every time a command is run on the system it creates an exit code if the exit code is zero that means everything’s hunky-dory it ran all right if the exit code is anything other than zero one or any other number that means that there was an error of some sort or
It didn’t work the way it was supposed to so you’ve seen commands where you have the double ampersand right what am i doing there it is my finger just wouldn’t go the right way well you probably wondered why that’s done that way well basically what double ampersand
Means in the shell is that we’re going to run two man’s side you know one after the other and if the first command runs successfully then we’ll run the second command so we can use that in a test like this so what we’re basically going
To say here is yep okay so if the test is test does a does this variable equal B here we go yep it works now we can also have an else in this but two pipes in a row there and that basically tells the system okay
If the command in front of this didn’t run properly if it throws an error and put something in the exit code then guess what I you know so let’s let’s demonstrate this it’s gonna do it the other it’s gonna do the opposite thing which is what I was trying to say so for
This one we’re going to echo nope huh so this is our echo let’s go and change our test let’s make this equal a of course we could change the variable at this point too we could do anything to make this do this but here we go see
That is a basic test using the test command right there now you can also do an opposite where we’re gonna tell it okay we’re testing to see if this variable is not a wonder what’s gonna happen yep see we changed it we put it on its ear
Now we’re looking to see if it’s not there and we get a different result so that’s how basic tests work now we come up here and the basic tests are really quite useful so here is the the format that we were just using there and we can
Actually let’s let’s go ahead and put this one in place and this is a this is testing for a file so let’s go ahead and just copy this one and clear the screen there please and see let’s see did that run what did that do
Yeah there you go so now you get some idea of how this works – RC is not there why because we’re not in the home directory so if I do this and I run exactly the same command watch – RC is here there you go pretty cool huh now one of my favorite
Little snippets of code ever is this thing right here and I use it all the time and it’s basically we’re testing again so what’s going on is that we are listing what is in the package base for our aboon – or Debian system right there that’s that one command DP kg/l lists
All of the installed packages we send the output into the grep command what the grep command does is it looks for whatever string of data you tell it to look for and in this case we’re telling it to look for this and do it quietly we’re not gonna put anything on the
Screen at all and we’re looking for ffmpeg which is our package right so if that does not exist then you’re going to get an error code that goes into the variable for the error and since it didn’t run probably fit through the error code you get this double pipe
Right here sudo apt install and then this tells it to do it anyway and do it very quietly and it grabs the ffmpeg package one thing I have not shown you is that variable so let’s do that so I make sure that I you you’ve seen what
I’m talking about where does the exit code go well it goes into a variable called question mark it’s all that’s all it is so the last command that ran ran properly so I can do this let’s do the which command and then just make up some weird thing that doesn’t
Exist it’s not there right now we get an exit code of one some programs have special exit codes their error codes that you can look at the documentation and it says you know if you’ve got a code 255 it’ll tell you what went wrong and where it went wrong
In the code that’s usually for really deep development stuff and and most regular users aren’t gonna run across that for sure so let’s go up this way I’m not done yet I got more stuff to talk about do that at the end okay all right so I’ve shown you how the testing
Works and I have some examples here and this is an if statement now an if statement is a little bit more of advanced way to do a test the actual test command here is this set of brackets that you see right here right here that’s another way of writing out
The test command we get the output of that and essentially if the the syntax goes like this if we test for something and it’s there then we will do this and you run some commands but if it’s not there or if the test fails then we will
Do this and then the little token down here fi tells the system we’re out of that if statement you the else is optional you can have if statements that basically don’t work unless the whatever they’re testing for matches up to however you want it to be whether let’s
Say for instance you’re testing to see whether a file is there or if it’s not there if the file is not there then we have to halt the script because it doesn’t have something it needs to work with so that’s how those tests work and
Then here I go into how you can use tests if to test for errors now here’s a really good example here this is from a script that I have we’re looking for the ifconfig utility so let’s just talk about how this run this one runs here so
We’re using the which command to look for ifconfig and we’re taking the output from that whatever that is and throwing it in to Devon all because if it finds it it’s going to give you a path where it exists we don’t really want that information printed on
The screen what we’re interested in is the exit code so then we test for the exit code see if that variable equals zero does not equal zero actually that’s the way I wrote this you can go either way you can have it where a test to see if something is there or whether
Something isn’t there but if it doesn’t equal zero then it throws an error sink all the ifconfig communityís utility is not installed and you see that we’re taking this error message and we’re putting it in error too and then we are exiting the script without executing anything else
And we have an exit code on the end of one which means that our script will exit with an error code that will go into the variable that is the dollar sign question mark that’s how that works so the next thing that I want to get into in this video is talking about
Functions we’re going to talk about setting up an advanced script and I’m gonna just show you some examples of how this works we’ll look at some scripts that I already have that are done this way and this is kind of a teaser concept because there’s a lot more that goes
Into how functions work but you take all of this testing and then you you’re able to grab options and when you get those options then you can have a script that instead of runs linearly from the top down you know one thing right after another now you can load a bunch of
Functions into memory these are like miniature scripts there like commands that you create within a script and then you can run those in any order you like so an advanced script would look something like this we have but first we start out with our shebang up at the top
And we don’t have our comments here you know this is an example script and then we would declare variables this would be any variable that would you’d need to declare at the beginning you usually what I do in this space here is to grab variables from the shell so for
Instance if one of the variables that my script uses is username sometimes I’ll go ahead and grab those and then I’ll make them a local variable to the skip the script it makes it a little bit more robust when the script runs sometimes you’ll run into strange problems with
Variables you’ll create a command you’ll have your variable in there it looks the way it’s supposed to be and for some reason the script acts like it isn’t there or doesn’t run properly so what I find is that if you grab a shell variable and then you put it in a local
Variable like that then it’s going to run better so the next thing that we would do would be functions and there’s a two separate syntaxes for functions this is the one that I use there is another one that’s better so you start out with the the name of your function
In this case I’ve called this function one and you get two little parenthesis right there and then you have a curly Q bracket and everything in here are the commands that you’re going to run in that function and then at the end of this this is what the end is and all of
This information right here is put into memory and now you can call these functions just like commands within the script so one of the first things here that I have demonstrated is that within a function you can create lair variables that only exist within the function these are not global shell variables up
To this point we are creating a variable for the shell environment that we’re working in so you have the global shell variables then we’re creating variables within our script they exist while the script is running and then within that script we can have variables that are assigned only to the function so when
That function stops running we get out of it and we move to something else that variable is not being looked at and that can be a very useful little tool the end of a function you have the return command the return command is similar to exit but instead of exiting the entire
Script when you use the return command what you do is is you go back to the environment that the script is running in this is very useful for error statements within a function or for some reason you need to stop a function halfway through execution you don’t want
To completely leave the program what you want to do is you want to go back to something else and that’s what that’s for and it you can have a return code exit code as well but most people who are writing the scripts that we’re kind of talking about we don’t really need to
Get that deep into it unless we’re doing something you know really huge so I’m not going to talk much about return exit values and you see we have another function down here we can set more local variables in here and now if for some reason we have an error code within a
Function we can exit and use the exit code one that basically says this script screwed up and it’s putting an error exit code into the question mark shell variable there so once you declare your commands we’ve we’ve grabbed our variables up here at the top we declare
Our commands or our functions and our variables this the we’re just loading all this crap into memory basically now we get down toward the bottom of the script and then we’re going to do execution so that order is very important because you can’t run a function that isn’t in memory yet so you
Can’t be calling on a function somewhere up here at the top of the script and you haven’t loaded it yet the system will go there’s an error I don’t know what you’re talking about because it loads from top to bottom so in execution the first thing we usually do is test for
The options and then we use commands to call functions so what we can do now is we could call function 1 and then function 2 and then we could say exit if we wanted to and there you go probably be a little bit easier at this point if
We actually look at a script it works that way so let’s go ahead and wrap that video this video up by looking at a script like that so we are going to use Nano because it it’s just pretty to look at and we’re gonna look at let’s see what
Where my documents right scripts right we gotta get projects yep and we want to look it up yep and we want to look it up because that’s the name of the script right now I wrote this script a while back to demonstrate functions basically but it has become a tool that I use
Every day and just recently posted video where I did some small updates to it so here you go we don’t have any variables in up because we don’t need it but we do have this extra command right here see this set II now that’s a unique command
It’s very useful in certain scripts and what it does is it basically tells the shell while this script is running this if there’s any error at all just stop working you don’t need an exit code nothing just if you get an exit code of from any command that’s running within this error
Of one or anything else in other words a bad exit code from anywhere just dump the thing and move on and I did that because this is handling updates so the first function you see has some pretty simple commands in it first function here that we’re working with is called
Update and it echos that we’re starting a full system update and then it does sudo apt update and then sudo apt dist upgrade which should be pretty familiar commands for folks who use Debian and Ubuntu and I have been informed that with apt this dist upgrade should actually be full upgrade
But this upgrade seems to works on leaving it be for the time being so that’s our first function which is a basic update our second function is going to be a clean up now the clean up function is going to be sudo apt Auto remove and then we have sudo apt Auto
Clean what the Auto clean function does is it goes into the apt cache which is in var that is where the packages that you have installed on your system have backups and it removes anything that for some reason you can’t actually install again sometimes that happens and you get
Those orphaned packages left behind that’s not the same as Auto remove what Auto remove does is it removes programs that you no longer need and libraries that are installed on the system that are now not being depended on by anything else so they’re not like full-fledged system programs where you can interact with
Them but their components that other programs need sometimes they get left behind when something gets uninstalled so that’s the clean up function now I must explain what the YY is about because people ask the reason why the YY is there is that in older documentation for the apt and apt-get utilities it
Says that if you put a YY that it will pretty much ignore any on-screen prompt and it will just run the thing and so the first y says yes run it and the second Y is like really yes run it so that’s what that does so we have a
Function called update we have a function called clean and now we have a function called leave and in there you will see that we have pretty simple stuff it’s just me echoing this nice little bit of ASCII art that says update complete and then just using three lines
It’s a pretty simple way to do that we’re gonna look at a more sophisticated way to put stuff like that on the screen in the next video and then we have an exit here and if there’s no number next to the exit then that means that it’s
Going to exit with zero means that’s what we wanted to do when the script is done it’s going to leave an exit code of you know zero now the next function that we have is called up help and here’s a situation where we’re using a more sophisticated
Way to print stuff on the screen and we’re gonna get into more to that we’re using what is called a here document to do this and it’s basically taking this text and sending it into the cat command and it will send all the text from here
All the way down to where it says EOF right there that’s the token for the end of that and that is in a function so when the script runs all of this stuff that we’ve just looked at is loaded into memory now we get to the execution section and I have
This thing here tell them who we are which kind of just tells you what this thing does and I didn’t do that when I did the p2v script because ffmpeg you know scroll so much stuff up the screen that you’d never really get to see it so I didn’t
Bother what to tell them who we are that’s something I’ve done in scripts for a long time so then we’re gonna do the update and clean and we are testing argument one right there do you see that for the option clean and if that’s the case then I say okay run these commands
Run these functions as commands here so it runs update clean and then it leaves and that is in an if statement so if you didn’t put clean in there the if statement just skips it just keeps going because it didn’t match the criteria it doesn’t actually run the commands so if
You typed in up and then you put as the first argument this now we run the part of the the function that we just looked at called up help and that’s what it does and it exits the script bye see you later so if you want to run it again you
Have to put something else in now this is check for an invalid argument this would be this is putting anything else in other than – – clean or – – help right here so this is what we’re testing for this is what this command does it says basically if there’s anything in
The argument by this point since it didn’t test here didn’t say trip this didn’t trip this and we have some gobbledygook in there just somebody mistyped something or you know whatever then what it’s gonna do right there is it’s gonna say hey you put some garbage
In here and I don’t know what to do with this so that’s why we get that error message and that error message is being sent I believe to the error Channel but what you’re seeing here is that we have to go over to look because this is what Nano
Does that’s how it continues a line so there it is right there and then finally if you don’t put any argument in at all and there’s nothing in there then it comes down here where it just runs a regular update and then it runs leave so that’s how that script works and you
Have been shown all of the concepts that go into the making of this script so now you should understand exactly how it works and what it does this information is going to be in the description for this video and you can link over to that I’m going to post that on the news
Section of the easy Linux site your feedback is always welcome and got some really nice feedback from part one so thank you very much now in part three we’re going to take a look at here documents we’re gonna touch on menus and I haven’t quite decided what else we’re
Gonna talk about in there I got to go off and do a little bit research myself to see what concepts will jump into the next time around as I said as we get further into this it’s going to be a little bit more nonlinear so check out
Easy links comm for more about Linux also join the discussion and easy talk it’s free secure and fun it’s so it’s a forum that we run ourselves we control it from the server on down please be sure to give easy Linux a like on Facebook if you are a Facebook user and
Of course if you liked the video give it a like as well certainly do appreciate it looking forward to part three coming up soon thanks for watching
-
Sale!
Wireless WIFI Repeater Extender Amplifier Booster 300Mbps
$29.99$14.99 Add to cartWireless WIFI Repeater Extender Amplifier Booster 300Mbps
Categories: Electronics, Wi-Fi Router, Wireless Wi-Fi Extender Tags: 300Mbps, 802.11N, Amplifier, Booster, Extender, mobile wi-fi booster, Remote, WIFI, Wireless, Wireless WIFI, Wireless WIFI Repeater, Wireless WIFI Repeater Extender, Wireless WIFI Repeater Extender Amplifier, Wireless WIFI Repeater Extender Amplifier Booster, Wireless WIFI Repeater Extender Amplifier Booster 300Mbps$29.99$14.99 -
Sale!
Full RGB Light Design Gaming Headset Headphones with Mic
$24.99$14.99 Add to cartFull RGB Light Design Gaming Headset Headphones with Mic
Categories: Electronics, Gaming, Gaming Headsets Tags: Design, Full, Full RGB Light Design Gaming Headset, Full RGB Light Design Gaming Headset Headphones, Full RGB Light Design Gaming Headset Headphones with Mic, Gamer, Gaming, Gaming Headset Headphones, gaming headset wireless, Headphone, Headphones, Headset, Light, Mic, Package, RGB$24.99$14.99 -
Sale!
Wireless BlueTooth Multi-Device Keyboard Mouse Combo
$39.99$19.99 Add to cartWireless BlueTooth Multi-Device Keyboard Mouse Combo
Categories: Electronics, Gaming, Gaming Keyboards, Keyboard Mouse Combos Tags: Combo, Keyboard, keyboard mouse combos, Mouse, MultiDevice, Set, WireKeyboard Mouse Combo, Wireless, Wireless BlueTooth Keyboard Mouse Combo, Wireless BlueTooth Keyboard Mouse Combos, Wireless BlueTooth Multi-Device Keyboard Mouse Combo, Wireless BlueTooth Multi-Device Keyboard Mouse Combos$39.99$19.99 -
Sale!
High Back Leather Executive Adjustable Swivel Gaming Chair with Headrest and Lumbar
$199.99$139.99 Add to cartHigh Back Leather Executive Adjustable Swivel Gaming Chair with Headrest and Lumbar
Categories: Gaming, Gaming Chairs Tags: Adjustable, Chair, computer chairs, Desk, Executive, Gaming, Girl, Headrest, High, High Back Leather Executive Adjustable Swivel Gaming Chair, High Back Leather Executive Adjustable Swivel Gaming Chair with Headrest, High Back Leather Executive Adjustable Swivel Gaming Chair with Headrest and Lumbar, High Back Leather Executive Adjustable Swivel Gaming Chairs, Leather, Lumbar, Office, Racing, Swivel$199.99$139.99 -
Sale!
Professional LED Light Wired Gaming Headphones with Noise Cancelling Microphone
$29.99$19.99 Select optionsProfessional LED Light Wired Gaming Headphones with Noise Cancelling Microphone
SKU: N/A Categories: Electronics, Gaming, Gaming Headsets Tags: Cancelling, Gaming, Gaming Headphones with Noise Cancelling Microphone, gaming headset, Headphones, Headset, LED, Light, Mic, Microphone, Noise, Professional, Professional LED Light Wired Gaming Headphones, Professional LED Light Wired Gaming Headphones with Noise Cancelling Microphone, Wired, Wired Gaming Headphones, Wired Gaming Headphones with Noise Cancelling Microphone$29.99$19.99 -
Sale!
Gaming Desk with LED Lights USB Power Outlets and Charging Ports
$349.99$249.99 Select optionsGaming Desk with LED Lights USB Power Outlets and Charging Ports
SKU: N/A Categories: Computer Desk, Gaming, Gaming Desk Tags: and Charging Ports, Charging, Desk, Desks, Gaming, gaming desk with led lights, Gaming Desks with LED Lights, Home, LED, Lights, Monitor, Office, Outlets, Port, Power, Room, Stand, USB, USB Power Outlets, White, Workstation$349.99$249.99 -
Sale!
Wired Mixed Backlit Anti-Ghosting Gaming Keyboard
$99.99$79.99 Add to cartWired Mixed Backlit Anti-Ghosting Gaming Keyboard
Categories: Electronics, Gaming, Gaming Keyboards Tags: Antighosting, Backlit, Blue, brown, Gaming, Gaming Keyboard, gaming keyboards, gaming keyboards and mouse, Keyboard, Laptop, Switch, Wired, Wired Mixed Backlit Anti-Ghosting Gaming Keyboard, Wired Mixed Backlit Anti-Ghosting Gaming Keyboards, Wired Mixed Backlit Gaming Keyboard$99.99$79.99 -
Sale!
Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset
$119.99$59.99 Add to cartWireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset
Categories: Electronics, Gaming, Gaming Headsets Tags: 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset, ANC, Audio, Bluetooth, Cancellation, Ear, Earphone, gaming headset, Headphones, Headset, Hi-Res Over the Ear Headphones Headset, HiRes, Noise, Wireless, Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Headphones, Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset, Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headsets$119.99$59.99 -
Sale!
Wired Sports Gaming Headset Earbuds with Microphone
$19.99$9.99 Select optionsWired Sports Gaming Headset Earbuds with Microphone
SKU: N/A Categories: Gaming, Gaming Headsets Tags: Accessories, Earbud, Earphone, Earphones, Gaming, gaming headset with microphone, Headphones, Headset, IOS, Microphone, Sports, Wired, Wired Sports Gaming Headset Earbuds, Wired Sports Gaming Headset Earbuds with Microphone, Wired Sports Headset Earbuds$19.99$9.99 -
Sale!
150W Universal Multi USB Fast Charger 16 Port MAX Charging Station
$49.99$29.99 Add to cart150W Universal Multi USB Fast Charger 16 Port MAX Charging Station
Categories: Charging Stations, Electronics Tags: 150W, 150W Charging Station, 150W Universal Multi USB Charging Station, 150W Universal Multi USB Fast Charger 16 Port MAX Charging Station, 150W Universal Multi USB Fast Charger 16 Port MAX Charging Stations, 150W Universal Multi USB MAX Charging Station, 16 Port MAX Charging Station, 3.5A, Charger, Charging, Fast, laptop charging stations, Max, Multi, Port, Stand, Station, Universal, USB$49.99$29.99
Also, on just about every unix system "~/" is the user's home directory.
So for example, cd ~/ will always take you home.
Thank you Joe 🙂
Great introduction and walkthrough, really helped me progress. Keep up the good work
You have a talent for explanation and teaching. It all makes so much sense and leads so well I rarely get confused. And I am a beyond newbie. I have exactly a few days experience with Linux. This is great!
Great stuff men thank u very much.
what is the meaning of &2 and why it is used in if statement.Please if any body can help
Very helpful to understand coding !
This is so great man.Just WOW!!
thank you a lot Joe, from Taiwan with appreciation
I really appreciate your work, you are lighting a candle to bright everybody. Great man
I wish you could change the pointer so we can see what you are pointing at on the script
and it was a big step from the first part,.
and thanx for you
I hope this isn't too late. I have completed the videos you uploaded and after re watching them for a couple of time, i am pretty comfortable with the concepts. I'd like to apply this knowledge somewhere but i don't know where to start. Any recommendations ? Thank you for the great content!
Thank you very much Joe!
I don't know if I'm too late but I wanted to say that tests are like if statements , right ?
Can you include a link to that script so we can install the up program? That sounds really useful. I am a constant updater. Gotta have all those features! Love your videos BTW very informative. Just installed Ubuntu 20.04. Loving it so far.
What is the -n flag in the if means though?
Great job, very clear tutorial, it is refreshing to see a demystifying tutorial on bash scripting. keep up the great work!
Great series! But I am asking myself, whats the content of the document "Why Parents Drink.doc" 😉
perfect series! Very underrated
Just WoW
Just WoW
Very well done Sir. Thanks a lot!
thanks bro!
Great explanation;
Highly appreciated
Now I know better about bash scripting .
I have been working in IT for some time and I have to say that you are and EXCELLENT teacher. Subscribed and looking forward to more of your great videos!!