Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is the need of including script interpreter in your
shell script?

Answers were Sorted based on User's Feedback



What is the need of including script interpreter in your shell script?..

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

What is the need of including script interpreter in your shell script?..

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

Post New Answer

More Shell Script Interview Questions

How will I insert a line "abcdef" at every 100th line of a file?

2 Answers  


how to separate the even and odd number generated from one file to two separate file i.e. even numbers in file1.txt and odd numbers in file2.txt

4 Answers   Infosys,


how to delete all the files with extension .dat rom a directory tree from root to third level in a single unix command?

4 Answers  


What is the command to find out users on the system?

0 Answers  


Is shell and terminal the same?

0 Answers  


what is the difference between sh & bash shell?

1 Answers  


How to set an array in linux?

0 Answers  


Script S1 (which copies .dat files from one directory1 to another directory2) run continuously. Write Script S2 which kills S1 first, compresses all .dat files in directory1 and directory2 successfully, re-run Script S1 and stops self i.e. S2.

2 Answers   IBM, TCS,


What is shell prompt?

0 Answers  


What happens when you type ls?

0 Answers  


How to print some text on to the screen?

2 Answers  


Is SSO and SSL support BOXI?

2 Answers  


Categories