Saturday, 7 September 2013

Executing ksh script from bash

Executing ksh script from bash

During one of my interviews I came across a very basic question about
shell scripting and I could not find the answer for it. Question was: If
first line of the script is "#!/bin/ksh" can I execute it on bash?
My answer was No. And the reason to include a directive as the first line
of script is to tell which interpreter needs to be used. But the
interviewer's answer to this question was Yes. Can anybody explain me the
reason?

No comments:

Post a Comment