why is the line #!/bin/ksh is the first line in a shell script
#!/bin/ksh
is the first line in a shell scr开发者_如何学Goipt always
what is the importance of this line and why is it kept as the first line.
This line tells the operating system what interpreter to invoke to run the script.
Without it, there's no way to know that this script needs to be run using the ksh
interpreter.
The sequence is known as a "shebang", and you can read more about it on Wikipedia.
If the file is executable, it tells the os, which program can execute the script.
it signals that the script is to be executed by ksh (instead of any of the other shells)
精彩评论