Shell Script

Shell Script

A shell script is a list of commands in a computer program that is run by the Unix shell which is a command line interpreter. A shell script usually has comments that describe the steps. The different operations performed by shell scripts are program execution, file manipulation and text printing. A wrapper is also a kind of shell script that creates the program environment, runs the program etc.

Types of Shells

There are two major types of shells in Unix. These are:

Bourne Shell

This is the default shell for version 7 Unix. The character $ is the default prompt for the bourne shell. The different subcategories in this shell are Korn shell, Bourne Again shell, POSIX shell etc.

C Shell

This is a Unix shell and a command processor that is run in a text window. The character % is the default prompt for the C shell. File commands can also be read easily by the C shell, which is known as a script.

Capabilities of Shell Script

The different capabilities of the shell script are ?

  • Batch jobs
  • Several commands that would be entered manually in a command line interface can be executed automatically using a shell script. This can be done without the user needing to trigger each command separately.
  • Programming
  • There are many features in modern shell scripts that are only found in sophisticated programming languages such as arrays, variables, comments etc. Many complicated applications can be written in shell scripts using these features. But there is a problem i.e. shell script languages don’t support classes, threading etc.
  • Generalisation
  • It is much more flexible to use loops, variables etc for multiple tasks in shell script. An example of this is a Unix shell script known as bash, which converts jpg images to png images.
  • Shortcuts
  • There is a shortcut provided by a shell script for a system command where command options, environment settings or post processing apply. This still allows the shortcut script to act as a Unix command.

Advantages of Shell Script

Some of the advantages of shell script are ?

  • The commands and syntax of the shell script are the same as that entered at the command line. Because of this, there is no need to switch to a completely different syntax.
  • It is much faster to write a code in shell script than in other programming languages. This also means that the program is easier to create and files required can be selected easily.
  • Shell script can also be used to provide linkage for already existing programs.
  • Shell scripting can be used by users that are not experts to modify and tailor the behaviour of their programs according to their requirements.

Disadvantages of Shell Script

Some of the disadvantages of shell script are ?

  • There may be errors in shell scripting that prove to be quite costly.
  • The programs in shell script are quite slow while executing and a new process is required for every shell command executed.
  • Different platforms in shell scripting may also have compatibility problems.


要查看或添加评论,请登录

NISHI KUMARI的更多文章

  • What Is Digital Legal Talent?

    What Is Digital Legal Talent?

    “Talent” is a common term lacking a conventional meaning. The importance of a working definition goes far beyond…

  • What Is Six Sigma?

    What Is Six Sigma?

    Six Sigma is a quality-control methodology that businesses use to significantly reduce defects and improve processes…

  • What is PMI?

    What is PMI?

    PMI or a Purchasing Managers’ Index (PMI) is an indicator of business activity -- both in the manufacturing and…

  • What is Debt Recovery?

    What is Debt Recovery?

    Debt recovery and debt collection are similar terms with one small, but very important distinction. The difference is…

  • Row-level security (RLS)

    Row-level security (RLS)

    Create roles It's possible to create multiple roles. When you're considering the permission needs for a single report…

  • What is NULL ?

    What is NULL ?

    In Structured Query Language Null Or NULL is a special type of marker which is used to tell us about that a data value…

  • Delta Format

    Delta Format

    The Delta format is a storage format used in data lakes, particularly in the context of Azure Data Factory and Azure…

  • Amazon SageMaker

    Amazon SageMaker

    Amazon SageMaker is a fully managed machine learning (ML) service provided by Amazon Web Services (AWS). It enables…

  • What is SharePoint?

    What is SharePoint?

    SharePoint is a web-based collaborative platform developed by Microsoft, launched in 2001. It is primarily used for web…

  • What is Data Pipeline?

    What is Data Pipeline?

    A data pipeline is a series of processes and tools designed to collect, process, and deliver data from various sources…

社区洞察

其他会员也浏览了