Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is shell scripting?

What exactly is shell scripting?

And what is Bash, Korn, and Expect? I use a few commands in a Linux terminal, is that shell scripting too? Again I am confused what exactly is shell scripting?

like image 480
sai Avatar asked Nov 28 '22 23:11

sai


2 Answers

Your terminal runs a shell , probably bash - korn, csh and others are similar shells with different features and syntax.

While you probably use it mostly to run commands, most shells are an interpreter for command language defined by that shell. Programs in that language is called a shell script. See this howto for an overview of shell scripting in bash.

like image 76
nos Avatar answered Dec 04 '22 05:12

nos


Shell scripting is the process of creating a file containing several shell commands (i.e. ls, cd, grep, etc) than can then be executed.

bash and korn are both shells - they allow you to interface with the computer through a command line, rather than running programs by clicking on icons.

The purpose of shell scripting is to automate repetitive tasks, such as setting up an environment to launch a program, or checking to see if logfiles have changed, or archiving a directory (or set of directories) or any other number of tasks.

Check this out for more info.

like image 26
Wayne Werner Avatar answered Dec 04 '22 03:12

Wayne Werner