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.

Beginning a shell script

Beginning a shell script - Linux Tutorial

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

Start my 1-month free trial

Beginning a shell script

- Let's talk about scripts. A script is a program written in an interpreted language, typically associated with a shell or a compiled program. In Linux, many scripts are going to be written as shell scripts. These are associated with a bash or another shell. Users can write shell scripts to help automate tedious, repetitive tasks, or to perform new and complex tasks. Scripts perform many of the Linux start up functions as well, so mastering scripting is going to help you manage that start up process for your distribution. Shell scripts are plain text files so they're created in a text editor like vi, Emacs, Nano, or Pico. A shell script is going to begin with a line that identifies the shell that's going to be used to run it. For example, if you see something like #!/bin/bash, you know it's a bash shell. The first two characters, the # and the !, are a special code that tells Linux that this is a script and the rest of…

Contents