Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why is the line #!/bin/ksh is the first line in a shell script

Tags:

shell

unix

#!/bin/ksh is the first line in a shell script always

what is the importance of this line and why is it kept as the first line.

like image 423
Vijay Avatar asked Apr 20 '10 08:04

Vijay


People also ask

Why is line used in art?

Lines often define the edges of a form. Lines can be horizontal, vertical, or diagonal, straight or curved, thick or thin. They lead your eye around the composition and can communicate information through their character and direction.

Why is the line the most important element of art?

Line: A very important Element of Art is “Line”. Imagine a work of art with no use of lines. Whether it is a drawing, painting, or sculpture, lines are important. They help form shapes, and also can communicate an idea or feeling.

What is the use of a line?

The use of lines, or outlining, to create a sense of shape is most commonly used in cartoon style illustrations or animations. Another use of line in graphics is the ability to help suggest a tone or feeling in a work. Vertical lines can be used to create a sense of strength or stability.

What are the 10 types of lines?

There are many types of lines: thick, thin, horizontal, vertical, zigzag, diagonal, curly, curved, spiral, etc. and are often very expressive. Lines are basic tools for artists—though some artists show their lines more than others.


1 Answers

This line tells the operating system what interpreter to invoke to run the script.

Without it, there's no way to know that this script needs to be run using the ksh interpreter.

The sequence is known as a "shebang", and you can read more about it on Wikipedia.

like image 52
unwind Avatar answered Jan 03 '23 16:01

unwind