Also what are the main differences between these two. To execute a script is it necessary to write this at the beginning of script?
Asked
Active
Viewed 1.2k times
2
1 Answers
1
If you make a script executable, the loader will treat the first line as an interpreter directive and use the specific program to run the script. In this case you are using the Korn Shell #!/bin/ksh
or the Bourne Shell #!/bin/sh
.

dank8
- 105
- 6

user1794469
- 4,067
- 1
- 26
- 42
#!/bin/ksh
and#!/bin/sh
? … what are the main differences between these …?" parts, I believe that this is a duplicate of What are the fundamental differences between the mainstream *nix shells?; see also Which shell should I use – tcsh vs bash? and (to a lesser extent) What's the difference between the terms “Shell” and “Bash”? – G-Man Says 'Reinstate Monica' Jun 21 '15 at 18:50