What is the need of including script interpreter in your
shell script?
Answer Posted / ganesh
When you ask a shell to execute the command $ date, the
shell uses the system call exec to
ask the UNIX kernel to execute the command you requested.
The shell passes the name of the command that should be
executed to the exec system call.
This system call reads the first two characters in a file to
determine how to execute the command.
In the case of shell scripts, the first two characters are
#!, indicating that the script needs to be interpreted by
another program instead of executed directly.
The rest of the line is treated as the name of the
interpreter to use.
Usually the interpreter is /bin/sh, but you can also specify
options to the shell on this line
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain about the slow execution speed of shells?
What exactly is a shell?
What language is used in terminal?
How will you emulate wc –l using awk?
What is a boot block?
What are the different commands available to check the disk usage?
What is the use of break command?
How to open a read-only file in the shell?
How do I run a shell script on a mac?
How do I start a shell script?
Please give me example of " at command , contrab command " how to use
is this growing field and what is average package in this?
What is .sh file in mac?
Why is it called a shell?
shell script for reverse the string