From the course: LPI Linux Essentials (010-160) Cert Prep

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Turning commands into a script

Turning commands into a script - Linux Tutorial

From the course: LPI Linux Essentials (010-160) Cert Prep

Start my 1-month free trial

Turning commands into a script

- [Instructor] In this lesson, we're going to learn a little more about scripting and start putting together some of the script components and make a couple of basic scripts. Now, the first one I want to show you is this script known as directory listing.sh. Now, what I'm going to do is just cat it to the screen so you can see it. Cause they already typed it up for us to save us some time because it's pretty straightforward. Now, you'll see here that the first four lines all start with a hash tag. Now that hash tag means comment, it means we're going to ignore everything in those lines. It's just for us, the humans to read but the computer is going to not pretend it's there at all. So what I'm saying here in the first line, this exclamation slash bin slash bash is that this is a bash script. The next line tells you what the script is for. It's a simple script to output the files in the current directory to the screen.…

Contents