wats the she bang statment with syntax?

Answers were Sorted based on User's Feedback



wats the she bang statment with syntax?..

Answer / shimpi

a shebang (also called a hashbang, hashpling, or pound
bang) refers to the characters "#!. The shebang is looked
for and used when a script is invoked directly.
Because the "#" character is often used as the comment
marker in scripting languages, the contents of the shebang
line will be automatically ignored by the interpreter
itself; the shebang line only exists to specify the correct
interpreter to be used.

Is This Answer Correct ?    4 Yes 1 No

wats the she bang statment with syntax?..

Answer / priya

shebang is also called as hashbang.This basically used for
interpretation.This should be the 1st line of any shell
script which indicate the script to run in specified shell.
For ex. If the 1st line of a shell script is #!/bin/ksh
then the program has to run under korn shell.If you do not
specified any shebang then it will run under default shell.

Is This Answer Correct ?    3 Yes 1 No

wats the she bang statment with syntax?..

Answer / sailabala sahoo

#!/usr/bin/sh
see bang line find the path of the interpreter.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Shell Script Interview Questions

The information of the two files should be redirect to Third file in such a way that, the third file contain the information like this. 1st line in third file should be from 1st file 2nd line in Third file should be from 2nd file 3rd line in Third file should be from 1st file 4th line in Third file should be from 2nd file - - so on

2 Answers   Caritor,


How to rename all the files in a folder having specific extension? Example: I have some files with extension (.txt) in a folder name 'Test'. I have to rename all the .txt files in a test and its subdirectories to .my extension.

15 Answers   Interra IT,


write a shell script to emulate the Id command of PRIMOS which lists files and directories. It list files first with a header FILES and then directories with a header DIRECTORIES. This command has several options. The main ones are. -file select files only -dir select directories only -reverse sort in reverse order -no_header put no header on the output -brief output the header only -size display the size of each file -help display Id´s syntax and options.

0 Answers  


Can you write a script to portray how set –x works?

0 Answers  


How do I run a powershell script?

0 Answers  






How to debug the problems encountered in the shell script/program?

0 Answers  


What is meant by $1 in shell script?

0 Answers  


What does chmod do?

0 Answers  


Explain about echo command?

0 Answers  


Hi All, Is it possible to create one file name only space or space in file name in UNIX and we can able to run that on Unix?

2 Answers   Cap Gemini,


Create a bash shell script to sort and then uniq the file from the command line & store it to a new file and output the results to the screen. Name this script "sortAndUniq.sh"

5 Answers  


What are the three main forms of enabling debugging in a shell script?

6 Answers   ADC, Wipro,


Categories