InterviewSolution
Saved Bookmarks
| 1. |
What is the shebang line in shell scripting? |
|
Answer» Shell scripts or programs often contain shebang at the top. In general, the Shebang (the SERIES of characters "#!") is used to indicate the operating system to use a particular interpreter to process the rest of the file. Here, the SYMBOL '#' is referred to as HASH, and "!" is referred to as bang. This usually aids developers in avoiding repetitive work. Scripts are generally executed by the engine; therefore, shebang DETERMINES the location of the engine that will be used to run the script. Example: #!/bin/bash In addition, this line also SPECIFIES which shell to use. |
|