 Dwayne McDaniel. Dwayne first started using Drupal and WordPress for the San Francisco Improv community in 2013, which led him to his current role. As a developer advocate at Pantheon, he has had the privilege of presenting at dozens of community events, from Paris to Iceland and from MIT to Stanford. Dwayne McDaniel. Awesome intro. Thank you very, very much for that. Says I was just introduced. Now I feel redundant. I'm Dwayne. How you're going to get the most out of this talk is you're going to go to mcdwayne.com and find the slides of this talk and just pull it up on your machine. If you're playing along at home, that's awesome. I'll talk more about how you're going to get more later, but if you ever want to talk about crocheting or web comics or karaoke like the awesome party tonight, we're going to sing good. I'm always happy to talk about those things. There's how to get a hold of me. Twitter is my social media of choice. I think it's the best social media thing ever made for events and I get a lot of events and if you go to my website, you'll see that. Quick plug for the company I work for that sends me here. This is Pantheon. Who in the room is familiar with Pantheon? That's about half the room. We are a website operations platform, a way to build and run your websites no matter how big your team is, no matter how complex your workflow gets. We're there for you. We post some of the biggest, most complex sites in the world and probably work with you. So quick pull time. Actually, actually, if I get everybody that's comfortable standing up right now to just stand up real quick and let's practice raising our arms. Everybody just raises our arms up as high as you feel comfortable doing it. If you don't push it, all right. Now put your arms down and look to your left and right and see if you know those people. If you don't introduce yourself real quick, take like 30 seconds. Hi, man, I'm Dwayne. Nice to meet you. Thanks. Thanks for coming up. All right, I got to get back to the room but thank you very much. All right, now we're together in a room doing a thing together. Good job. If you haven't met those people, talk to them later. It'll be plenty of time. Who saw this on the schedule and said, I want to go to that talk. That's half the room paying attention. Who in the room has a computer? Again, the same people don't raise their hand, they weren't paying attention. They have a computer open in front of them. Who here is a full-time developer? What they do is they consider themselves a developer. Awesome, you're going to get a lot out of this talk. Who here is a full-time designer and what they do is design? Awesome, raise your hand proudly. All the developers look around and see the designers because you really need their help. Really bad. Other way around, true. Any project managers in here? Yes, project managers rule. Is there any business people? They're business people. That's what they do. Awesome. Is there any other fields that I left out, any other things like things of note? Chugglers. Anyone else? Okay. Well, I hope all you get out of it. Does anybody in here create content on the regular? Ultimately, I think this will help you at the end of the day. That's going to be a while before we get there in this talk. I have a lot of slides and I'm not cutting them down for this talk and not for you guys. If you want to do this as a tutorial as a go on your own pace workshop, that's what I really built. I'm going to go through highlights today. I'm going to read every slide to you. If you don't know what bash is, don't worry about it. Just take some notes. Just pay attention and get some ideas. If you were using bash on the reg or casually just here and there and you copy, paste things into bash and you're not really sure what you're doing, maybe open your machine and play along when we get to the tutorial parts. If you can understand what that last line is, just go do that and we'll get there later because there's something in this talk for everyone. I call this talk bash is magic. No, it's not for a reason. We'll get to the no, it's not part later. But bash seems like magic. It's this amazing thing. Let's talk about magic for a second. Magic is exciting. It's kids birthday parties. It's card tricks. It's pen and teller. It's awesome, fun stuff. But it's also potentially really dangerous and confusing and black magic and just feels weird. And if you don't know what you're doing with it, this seems overwhelming and there's a lot to read here and there's a lot to think about. How would you even use this card? It's an awesome card, by the way. But I really want to demystify this. When I was talking to one of my business colleagues and I was trying to write this talk in the first place, I got stuck at a point and I was just bouncing ideas off then and he's like, you know, that sounds like kind of the whole point of open sources, isn't it? Like just tie in smart things together that other smart people made. And I'm like, that's really really an insight, Ben. So I put it in my talk. Because if we have all these open source tools that we can use and we can know what to do with them, they're not scary. But anything we don't know, the unknown, is always terrifying. Especially when you hear of stories like this, which isn't even a true story. It just got publicized. That we can do things that are just crazy powerful that can wipe out entire racks of servers with one bad command, which is technically possible, but this is actually a made up story. But ultimately we're all afraid of touching one wrong thing on our machine and doing this. But that real fear isn't that we're going to mess up a machine. It's a machine. Who cares? We're going to do another machine and move on. But it took us so long to get that machine set up the way we wanted it. It took us so long to figure out all the ins and outs of all the GUI screens for that operating system. Sometimes it takes years to get a machine to do exactly what you want it to do. And this fear is very, very, very real. But I'm here to tell you today, don't be afraid of it. I'm not the person that was going to tell you don't be afraid of it. There's a lot of people in the universe that will tell you don't be afraid of bash. If you have no idea what it is, don't worry about it. We'll get there. But it's not something to be terrified of. It is something that's going to unleash the power of your machine in a way that you can't do today. My center premise is this. Why do you want to do this? Because we live in a world behind graphical user interfaces. And there's nothing wrong with GUIs. GUIs make our lives easier. That we don't have to think about what to type to invoke a command. We can simply go click a button and do a thing. And that makes life great on Chrome. And if you're watching YouTube and a lot of other things, it's just easy. But what you're really living behind is what a developer thought you should do with your machine. Which is a very limited scope. Because they, as a developer working on a project or a designer, want you to do this set of actions in this order. And the GUI reflects that. There's nothing wrong with that. But this is also slow. Going through and setting up a WordPress website by hand is slow. Especially if you do it a lot. If you find yourself doing the same thing repeatedly over and over again every day, it turns out there's a better way to do that. You can automate anything that you can do repeatedly with the same repeatable steps if you tell a machine just to do those same steps. That's really hard to do with a GUI. Things like Zapier and if-then-then-that make that a little easier on a certain scale. But you can extend that to literally anything your machine can do. But just telling the machine what to do. And if you do development long enough, or you're in the space long enough, eventually you will run into a problem where someone will say, hey, there's already a really good tool that solves that. Why don't you just go get it off GitHub? And if you don't know what GitHub is and you don't know how to use these command line tools, it's like they're speaking in alien language from outer space. And like, I don't know. And you show up and like, I don't know what to do with any of this because it's not documented well. And ultimately, we know that we can tell machines to do very complex things through this idea of scripting. That we can tell it to do a bunch of order of things to do. And it can produce amazing results. And if you've never seen the ASCII Star Wars, we'll get to it at the very end where you can watch it online. Or just go to towel.lingonlight.net and tell them that. That's why I want to talk about this. This is why Bash makes me excited. It's because we can literally unlock our machines. So what are we talking about? We're talking about Bash. Bash the born-again shell. Why do we call the born-again shell? Because there's a guy named Stephen Born. And he used to work at Bell Labs. And they wrote a thing called Unix. Not the only version of Unix that existed in the universe. Unix stands for something. But Stephen was solving the fundamental problem of how do we move around files inside of Unix and evaluate them to do things. And about ten years later, nine years later, Richard Stallman said this should be open source and we're going to rewrite it under the GNU project. And Brian Fox, who lives up in Santa Barbara, I don't know if he still lives there, but he's from Santa Barbara, they rewrote shell. In honor of Stephen Born, who wrote the original, they called it the born-again shell. So that's where Bash comes from. And if you go to Wikipedia, it's going to give you this answer of what Bash does, which isn't wrong, it's totally the right answer, but it's too long, because this is really how you should think about Bash. Type commands do things. That's all Bash really does at its core. For those of you who are brand new to Bash, it's intimidating partially because you don't know how to use it, similarly to the way that a telegraph machine is intimidating. The underlying technology isn't dangerous or scary. We're going to send an electrical message from here to here. And on the other end, it will cause this action and they can write down what happened. That's not a crazy, weird idea, right? We can just send a message over a wire. Now, the code to head to it, that's a little confusing. Morse code, it's confusing to learn, but once you learn it, you can use it forever. Literally, it's been the same code for years and years and years. Turns out Alexa works the exact same way. Alexa for all it's do, does, all it's bells and whistles, if you go through the docs, eventually you get to a realization that all the box does is a really smart algorithm for natural language processing that writes down a text message and puts metadata around it based on where that device is located. So if I say, hey Alexa, where's the weather outside? It's going to write down that message and metadata and send it across the wire to a service. Now, that's kind of very complicated if you talk about lambda stack and things like that, serverless. But what the actual box gets back is a text message with metadata around it and it reads the text message to you and tells you the weather. And then you can do other things based on that metadata. But that's all Alexa does. It sends messages from point A to point B and leaves little files. And folders. Because that's at the end of the day what your computer really is, the giant pile of folders and files that get executed. That's it. Again, not a terrifying concept. Everybody that has a machine in front of them, who was not familiar with the concept of a file or a folder? We all are. Because it's fundamental to the way the machine works. All bash does is give you a much quicker, cleaner way to manipulate those things around that you can programmatically talk to. And then about 1992-93, there was a guy named Linus Torval who was working with a project, maybe you've heard of, called Linux. Linux became the default operating system for all the beige boxes in the world. So boxes that are off somewhere else running something else. Even Windows got on board with this recently and said, hey, if you're using Windows development version, you can just go ahead and run Linux because come on, that's what real developers use. Let's just put it there for you. Put whatever flavor you want. It's all ultimately the same thing. To get you, you can see tucks up there by a Windows terminal that's actually running Linux. It's ubiquitous. It's everywhere. Every machine you've probably ever touched probably has bash already in it because Linux is probably already there somewhere. And Linus Torval borrowed Stallman's project and said, this is the shell operating system we want for Linux. Bash became ubiquitous. That's why I'm teaching bash instead of the many other shells that got written. So I'm not going to talk about Z shell, C shell, C shell, and the zillion other shells you could run that all do the same basic thing. I'm talking about bash because it's ubiquitous. It's not just ubiquitous. It's how more complex things are being built because they're built out of this concept of Linux and these ideas of file systems. So who here is familiar with any of the stuff over there on the right? The CircleCI, Jenkins, CircleCI, or CI CD. All right, not many people in the room. These are build tools. These are services that perform actions that build, automate testing. The more complex your project, the more you're going to run into this stuff. So if you want to, every change you make on your code, go ahead and run this series of tests on it and then deploy the artifact that got built out of it being assembled to a target. Those are the tools that will let you do it. But essentially in their core it's just a machine you don't own that executes a bash script you wrote. So that world is really sealed off if you don't understand bash. The good news is bash is really straightforward to learn. And that's what we're going to spend the rest of today talking about. And at the end we'll get a little more tips and tricks of it and some advanced stuff. And then we'll open it up for what your favorite bash stuff is and what I might have forgotten. Because I am learning this as I go as well. We all are. For now Richard Stalman you probably don't know all the bash shortcut keys. So if you're on a Mac or a Linux box, guess what? You already have this. You don't have to do anything. Just open up a terminal. You're automatically in it. That's it. If you're on a Windows 10 box, professional edition, then jump into the Linux subsystem. If you have another Windows box just download git. Git gives you a really clean, simple minimized version of bash that you can do pretty much everything I'm going to show today with. So the rest of this talk is, well, these four areas of gaining and complexity of what it can do. There's some examples around it. And that's it. So again, if you're a casual user, open up a terminal. Play along. Maybe learn some stuff. Who here thinks this is like an intimidating amount of information on a screen? You can raise your hand. It's fine. This is an intimidating amount of information on a screen. Absolutely. A handful of hands went up for those who go home. If you know how to read this though this is all the information I wanted when I looked in this folder. All at one place at one time. It gives me a really good view as a developer what I'm doing. Let's talk about what's there. Because again this is a tutorial of how this works. Before that dollar sign, there's something that looks like this. On a Mac it defaults to this. Computer name, your current directory, your username, and then a dollar sign to tell you that's the prompt. That little tilde, it's actually kind of important. That tilde on a Mac in most Linux boxes will mean your home directory. If you just say where is home, it's a tilde. You'll see that in a lot of scripts. It's like you have a tilde there. Instead of dollar sign home means the same thing. Equivalence. But after the dollar sign is where we type the things. Let's start very simply. What I did is I went through all the manuals for all of these commands and we'll get to manuals later. I said what does the manual actually say this does? Then I said if I was going to turn this into Alexa command, how would I describe it? Except it says say in Alexa I say hey bash. So that's what literally I did for the whole rest of these slides. And then an example below of it actually running. So present working directory. We're going to step back just a little bit. The problem that Born was trying to solve is how do we move around and manipulate the files inside of Unix. It's all location based. So from bash's point of view PWD means where am I looking? Where is the current place that I am trying to manipulate space? What folder am I literally in? So a working directory is also a working folder interchangeable but PWD is the command. It tells me hey I'm in this long name of folder. LS I can say hey list the directory in this, list the contents of this directory. Same as opening a folder and seeing all the files in there. Except you can make it present a lot of additional information. Show all your hidden folders. One flag. And I realize right now it's like hey wait a minute what's a flag? This is always the point where someone starts getting nervous. Because yes there's a lot a lot a lot of flags. I used to say a zillion but that's not true. There's sometimes five, sometimes 40. But it's a limited number. And the nice thing is that bash is open source. I didn't really dwell on that earlier when I talked about Stallman and Brian Fox but this is important. It was written by people like you and me who believe in the open source concept that we should build tools and share them and share our knowledge. The entire reason we're at word camp, the reason you're in this room listening to me talk is to share information and knowledge and to get on the same page about all this. So LS minus gives you a view of everything and lets you see your dot dot and any dot folders. Dot folder is a hidden folder. Like my get folder in this directory. I don't really need to see it all the time. It's there. It's important. But I don't need to see it all the time. It's hidden. Dot means I'm here. It's a recursive concept of here. And dot dot means one level up. Pretty straightforward once you get your head around it and you're like wow that's a lot of information really fast. And you're right it is. I don't have that much time today folks. That's why these slides are available online. You can play along at home as you need to. And for every command that exists, there's a manual for it. Already included. It works on an airplane. It works when you're completely offline. If you're really bored and you have no internet connection, this will still work. And it's really powerful information. Just say man and then whatever command. Even manual itself has a manual to tell you how to use it properly. Man LS, man PWD, all of them will get to a manual. They're fun to read. Again because they were written by people like you and me. All the jokes I put in here, there are jokes interwoven through the manuals. I'm not kidding. Like very smart logic, like our smart witticisms throughout it. Alright so we tell, see where we are. We see what's in the directory. Then we can change the directory and move around. Moved other directories. Specific directory. We can give it a full path and say move all the way over here. Move all the way back. Then we jump around. Pretty straightforward. Move one level up. That's what the dot dot means. We can make directories. Making new ones very easy. Make a dir. Make directory. Very straightforward. Make the new folder and put it exactly where I say. You can specify this to be very deep in the level or just some different computer somewhere else. Bash is powerful enough as long as the path is clear to do whatever you want. I'm going to speed up just a little bit on this part. Oh, what happened there? I don't know. Copy. Let's make a copy of this thing and put it somewhere else. Pretty powerful. You got a weird lag going on. I don't know. Move. Move is where I say move. It is. This is actually a really powerful command because it's not just move from point A to point B. It can be move from point A to point A and rename it along the path. So if you need to rename a bunch of things really fast, move from point A to point B. It lets you do that extremely fast without having to invoke some weird GUI tool. Remove. Oh, now that actually we're starting to get to a world where it might be a little dangerous. If you remove the wrong thing, bad things happen. But good thing is that RM is actually pretty benign on its own. You can remove individual files, but you can't remove the entire folders. To do that, you're going to have to start invoking flags. Again, I got this weird lag. RM minus startup is probably the most dangerous thing. It is recursive. Everything I can see and everything below this, that's what we're going to affect. And F means force. That's why it's shouting. Because it's not giving you an option. If you do this, it is gone. It is gone forever and you'll never get it back until you like do the time machine back up or you pull it down. But this is also super powerful that if you completely blow up all of the work you've been doing today and you just like, I've got to start over from scratch today, jump up a folder, RM minus RF that folder, reclone it down from Git and you're right back to where you left off. Or where you left off last time you saved and uploaded to Git or committed to Git. History? How are all my first scripts really like practical scripts where I looked at my history. If you're in a terminal, just go into terminal type history. See everything you've ever typed. And it will just be there. Those are fun functions for flipping coins that I was just experimenting with. It was the most efficient way to do it. It turns out the random is the shortest way I could figure out how to do it. Clear in the screen, I used this constantly in fact so much that I aliased it. And that actually leads me to my next section. It is very simple. Let's get rid of everything off the screen. Oh, and open. When you double mouse click a thing to open a thing on an icon, what you're actually telling the computer to do is interpret this mouse click on a graphical interface to go run open against the location of this application. You're literally using the command line at level abstracted. This is actually really important because how do you open Firefox? Let's probably search Firefox. How do you open Chrome? Maybe go click on the icon. How do you open Composer? You don't. You invoke it through the tool. Open lets you get to anything that has a GUI and open things that you're used to opening. This actually becomes really cool about what you can tie together things you can and can't see when we get to that later in scripting. I'm going to speed up just a little bit more. So that's the basic stuff, the very, very basic stuff. There's applications and tools because your computer can do a lot of things, maybe more things than you think it's capable of now. Remember that we have at our fingertips more processing power than we had on Earth for all of the Apollo missions combined. At your fingertips, if you have like a 2015 machine, you have more RAM than existed on the planet Earth before like 1980. And we all hide it behind GUIs. And we have these crazy powerful tools that have been existence for 40 years. Think about how good iOS has become since it was launched. Like how much better it got. That's just like a decade. Imagine 40 years with these low level tools that a lot of people hack on. So there's grep. General regular expression search. Grep is the most powerful search pattern matcher that's probably ever been made. If you know what you're doing with regular expressions, you can build crazy powerful tools that can find things instantaneously. The actual way I use it for real is I keep all of my notes for all the events I go to in text files on my machine. And I can jump into that folder and grep any keyword. If I remember a partial phrase from someone's talk, I can immediately find it. It takes me less time than it takes to open a web browser to find something of a talk I went to last year. Curl. Pull this all the way across the internet. That's what it means. Again, it has a lot of flags. A lot of options you can do with it. One of them that's super powerful is curl minus capital I, which inspects the header. Is anybody here regularly checking to see if their front end cache is working? Awesome. This is a faster way to do that. For those of you who don't, turn up a terminal and just run this. This will just run on almost every machine on earth. Against any website you want. It will tell you literally the header information, what computers are reading. And it will tell you an age of a cache if a cache exists. That's the way I primarily touch it. Eventually, you will run into the need to actually modify a file. Enter VI. One of the most powerful tools ever invented by mankind. And I see you not shaking your head. I used to be in that same boat because I actually quit them as this. This is true. It's the anti-user friendly text editor. But it's the most powerful text editor I've ever used. Once you get the hang of it, being able to just slash, type anything and jump to that line or copy like 50 lines at once or inner visual mode and just yank things around. It's super powerful. You can actually play this fun game. Do I have it open? I don't have it open anymore. It plays a super powerful fun game called VemAdventure that will teach you Vem through a Legend of Zelda type of adventure. And once you learn it, it's like, wow, I will never go. I quit using sublime text in favor of them. This is a true story. But if you're like, I don't want to learn a billion hot keys, there's nano. And if you just need to manipulate a file really quick while you're in a folder, just nano. Nano is another editor. That's literally why I get the name. But it's ubiquitous. I used Pico here. Pico is a clone of nano. If Pico doesn't work, nano will. And if nano doesn't work, Pico will. It depends on the flavor of whoever put that box together. And there's a lot more tools you can install. In fact, there are thousands, maybe millions of tools you can install that do a lot of cool things. If you're on Mac or Linux, you can use Brew or if you're on Linux, use Appget on Windows, I don't know what you'll do. But you'll probably get Linux at some point and then you just use Appget or homebrewworks. And a lot of times when I go to very technical talks, they'll talk about a tool. And the very first thing I try about going to look at the web page or anything, I'll just go in and say Brew install in the name of the thing. And that's how I download software. That's it. And it already installs it, sets it up, makes it ready to go. And I can just then type the name of that command and just start working on it. There's a Legend of Zelda game you can do with this. Actually, there's two. One's really, really fun. The other's really hard. DX and SD. SDX was the joke one. Calc. I use my computer to calculate things. I think we all do. But I really hate the layout of Calculator. I just hate it. It's like you've got to put this button. No, I just want to type a really long equation and have it spit out an answer. And that's calc. But it doesn't come in pre-installed. But again, Brew install calc, you're done. And this just works then from now on. Get. Probably didn't come with your machine. But get is the most powerful version control human beings have ever figured out. It's essential to do development in the modern world. It's essential to share your code in open source. And this is the easiest way we figured out how to do it. The manual for it actually calls it the stupid content tracker. That's not any way, shape, or form of commentary on it. At least not my commentary. And you can see exactly what has gone on in a project. But again, there's GUI's on top of this. But what the GUI does is just run these commands. So if you learn the commands, you don't need the GUI anymore. There's awesome tools like links, browser, DuckDuckGo, which is the command line tool. You want to look up the manual for something and not leave the terminal? Install DDR. DuckDuckGo or command line. And there's thousands more. Drush for Drupal, WPCLI, WordPress. And pretty much everything I've pointed to here. Composer, dependency management, tie things together. Behat for behavioral testing. Backstop for visual regression testing to see if pixels are the same pixel to pixel. Much better than human being can possibly do it. This found a problem when I updated PHP 7.3 recently that I visibly couldn't detect. But it said, hey, this is going to cause problems. It saw that there was enough of a problem. It was a pixel off and one thing that it made me start investigating and realize that I shouldn't go to 7.3 yet with my setup. I should fix that and then go to 7.3. But backstop let me do it. And thousands and thousands and thousands and more. More than you could probably ever install through GUI. And the weight on these things is very minimal. It does not slow down your machine. That's the kicker on all this. You can have a thousand command line tools waiting at your disposal. And you don't have to wait for them to open up. True story, there's one from image magic called convert. I can convert any image from any format to any other format in under a second just by typing what I want it to do. I don't have to open Photoshop. I don't have to mess around with a GUI. I don't have to pick a menu. I just say convert image with this extension to the image with this extension. Done. Just does it. Thousands more. All right. I'm literally out of time. But I haven't got another half of this to go. There's this ability in bash to do bash profiles. Bash RC is what it's called resource in Linux. But it lets you say, hey, bash behave like this when I use you. But only when I use you. So I can say, hey, when I type SL, I actually meant LS. When I type LA, I mean LA minus A. LS minus A. LX, same thing. Or something really long, like I want to open up Firefox, FF. It's faster than spotlight search because I'm always in the terminal myself. Or Weather Underground, which will get me to the Weather Underground. Is that really fun? Yes. Is it super practical? I don't know. But version master really is. That's 18 characters that don't have to type every time I do a git push. To save myself that much life. That adds up a lot over time. Setting paths in your thing, this just tells bash where to go look for that program. So very easy. If I don't like the type of command for something that doesn't work, you can just set a path for it and say, hey, all right, next time I type it, it's going to open that. But again, this is just for you. So bash your machine doesn't default to these things. It's just for you. It's a very safe way to do it. Again, this is more for the tutorial side of how to actually implement it. And then we get to the most powerful part about bash. Thank you. Scripting. This is the first script you're probably ever write. Hello world. But in this, we can learn so much. There's so much here that if you configure, if you understand what this says, there's nothing you can't do. I promise you. This is where everybody starts. So let's talk about what we're seeing on the screen. The very first line. So bash is for moving things around and then evaluating the files and what to do with them. The very first line bash encounters tells it what to do. So literally it's called the shebang, the hashtag bang. It says, hey, bash, after this, I'm going to tell you what program to use to execute whatever is in this file. It doesn't have to be bash. You can do this for a lot of things like Python, Ruby, it's how you set the top first line to tell bash what to do with it. What runtime environment to use. Just happens to be on my machine. Then bash is where bash lives. Then hashtags are the comments. After that first line, hashtags just mean ignore this. Don't worry about it. Call it with a shell name and you give it permissions to run. Shamad changed the file mode. This gets dangerous and weird because the first time you encounter it you're like, what on earth do I do with this? Just hit 755 and you're probably going to be okay. Then you'll figure out what that means over time. Or plus x. A plus x is what I use a lot. Again, no time today to get into really what that means. Then you just tell bash to evaluate that file. So you type dot which means present directory I'm in slash name of the file. If you want to invoke a file that's somewhere else on your machine, just tell bash the full name of that path so it can go evaluate the file that's at the end of that path. Then it will do whatever that file tells it to do. That's all scripting really does. You can build local bend folders so you can do things really fast. You don't have to write type SH or worry about how you're going to format the line. Just tell it, hey, if it's in here, evaluate it. I tested this earlier. I tested it earlier and then I didn't actually bother to make it big. Clear. Make it a little bigger. Well, live demos. They've got list list list which will take forever because I'm in a hurry. List list list is a real programmer in about once a week to check on the health status before websites that are run. I have machines that we'll get to later, other scripting. Tell you what, we'll come back and look at its output in a second. Instead of me waiting on a green screen. But it will just go through and look at use WPCLI to invoke across these four sites. I actually rewritten this lately to use another command so it's taking a little bit longer to actually pull the names of the sites from something else. But go give me a report. Again, these are real things I actually use in my real life. Open these Firefox windows to these addresses and then warm the caches on these two sites. For a demo I do, it's the weekly demo at 10 a.m. on Wednesdays in Pantheon. You want to build demo websites? I do a lot of those. One time I had to build 80 in a day and I was like, I can't build 80 in a day. That would take me forever. So I built a script to build me 80 in a day and this is the script. And you can go get it yourself and run the exact same thing I ran. How I actually post our content to my blog is I ship it to GitHub. My machine grabs it from GitHub. It pushes it onto my environment. B-hat tests it to make sure it does exactly what I wanted it to do and that the links didn't break. Then it ships it to my test environment. Test it with backstop to make sure it's pixel-to-pixel the same thing that configuration was the same between those two environments. If that all works, then let's ship the thing to production. Just a giant bash script. You can have it if you want. Or you want to know that your website got updated because a lot woke up once a week to go check and see if there was updates, update the site in a different environment, then run a bunch of tests against it and push to production if it all worked. These are real scripts. These are real scripts that I actually use on a regular basis. And, hmm, operation timeout. I think I'm on a port issue right now because I switched to Wi-Fi networks right before this. That's what I did. So that ran because of port issues. Anyway, but the rest of this is like, wow, that's the basics. If you understand those general concepts I said, there's the basic commands, there's tools you can use, there's aliases, and there's scripts, that's bash. There's nothing terrifying about that. But I asked the internet and it said, hey, where, hey, she's back there. What are some tips about this? And immediately, like I'm talking within a day, 30 people got back to me and said, hey, there's all these tips like it, you can autocomplete just by hitting tab. You can make aliases for things. You can type up to go to the back of your last commands. Because I'm still not evaluating that program and I can't get to it clearly. Yeah, here's all the commands I've run for a while. Get checkouts, NPMs, doing a lot of testing with NPM stuff. Control-A, to jump from the front and back of a line. So if I type there, control-A, control-A I can jump around. Yeah, exactly. I learned something, I learned so much doing this. Oh, the reverse command search. I'm not going to show it off, but check it out. You will love it. The Astro character, one of those powerful characters in all of bash. That's okay. Nope. Yeah, it's clear. And then she just, no, I'm doing this. An alias for changing the desktop. Oh yeah, so I got all these screen shots. I'm going to RM minus RF. The dangerous one, SCR. So everything that starts with SCR and then anything after it, I'm just going to remove, do another LS. All my screen shots are gone. Because I don't need them anymore because they're screen shots and I don't keep screen shots around. I don't need to. I just clean up work. But the Astro character, super powerful. That guy that supposedly just deleted his entire machine did an RM minus F with a root level against Astrox and it just wiped out everything. It didn't actually happen. Tab pipe, pipe. I didn't talk about pipe because I don't have time. But the most powerful thing about the scripting and why it won, why shell is the standard and why C shell didn't win, is you can take the output from one command and insert that output into anything else you have. Literally pipe it from here to here. So you can run programs that go programmatically, get information, pull it back into the program and then use that information to keep running the program. Nobody else had really figured that out before Steven born. But pipe, most important thing I think on that screen. If you are wanting a really cool bash profile out of the box, a lot of people have built them but this is probably my favorite and Ted brought it up as well so I put it in this deck. CD minus, CD minus is the last channel button. This saves you so much typing. Because you can be in any crazy directory you want and just CD dash and you're right back to the last directory you were just in. Just like that. Very simple. And then there's the advanced one where I told you in the beginning with a if statement. Because in scripts you can do logic, if statements, and wins, and loops. And things like that, not wins. Yeah, do wilds. You can set strict mode in bash. It's not official strict mode but still it says fail when anything bad happens. So you don't actually push to production something that will break and then not tell you it broke and then you figure out like a day later that you took down a rack of servers. You're like hey, this is going to take down a rack of servers, just break and then tell me it broke. It's everywhere. It's literally every machine you've ever touched. Bash is probably in there somewhere. Don't be afraid of it. And you can Google anything. I like DuckDuckGo for documentation reasons. It's just a little bit better at finding actual docs I think. And it sounds good but I don't like the command line. I don't like typing things. Go to telehack. Telehack.com. This is still up and running from the Mountain View from Stanford down to Mountain View. Anyway, it's a terminal inside of your browser that you can play Zork, the original adventure game. It's an all text based game. It's print out primes, do cow say, figlet and all those other fun things. This is where you can watch Star Wars completely ASCII. And you can't blow up your machine. You can do anything in here and you're like oh that didn't blow up anything. Very safe. And there's thousands of guides. There's thousands of ways to learn this. And I'm happy to answer questions. Sorry I ran out of time for Q&A. I really would have hoped not to. But that's the whole time I got. I'm going to clap along with these guys. I think I'm going to now be out in the area over here by the surfboards and coffee to answer any of your all questions at the very end. Thanks.