What is the need of including script interpreter in your
shell script?
Answers were Sorted based on User's Feedback
Answer / abhijeet chavan (cts)
The script interpreter identifies using which shell the
script should be executed.
By default linux uses "bash" shell
Each shell has its own unique properties.
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / 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 |
How to open a read-only file in the shell?
What does .sh file contain?
What is the syntax of "grep" command?
how did u debugging in unix/ linux platform ??( project Related)
What is the conditional statement in shell scripting?
What is the way to do multilevel if-else's in shell scripting?
When should shell programming/scripting not be used?
What is bash used for?
how to print the 2-d, 3-d arrays in unix shell script programs please answer thi questio to my mail venusaikumar@gmail.com
Rewrite the command to print the sentence and convert the variable to plural: echo “i like $variable”.
How to write a function?
write a non recursive shell script that accepts any number of arguments and prints them in the reverse order