From the course: CompTIA PenTest (PT0-002) Cert Prep

Unlock this course with a free trial

Join today to access over 23,200 courses taught by industry experts.

Bash scripting techniques

Bash scripting techniques

- We looked at the basics of Bash shell scripting, but we just looked at the absolute basics. There's a lot more to it and we're not going to cover everything here. We're just going to cover a tiny bit more. We're covering Bash at a little bit more depth because the concepts are the same for all languages, but we have to start somewhere. So let's continue our exploration of Bash shell scripting and how it can help us automate tasks and ultimately do a whole lot less tedious work, 'cause that's the goal. It may seem a little tedious upfront to learn all this stuff, but again, the goal is to make the production process much, much faster and more reliable. So let's continue looking at Bash. In order to make a successful and helpful shell script, we're going to have to interact with the outside world. So we're going to have to input from and output to files, terminals, and maybe even the network. If your script needs to input from a terminal, we use the read command. read -p, and you give…

Contents