title: The init script works fine in databricks notebook but fails when attached to cluster
body: <p>I want to attach the init script (which has all library dependencies) with an interactive cluster in databricks. The init script look like the below attachment and works fine in databricks notebook.
  <a href="https://i.stack.imgur.com/QxZKm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QxZKm.png" alt="enter image description here" /></a></p>
  <p>I want this shell script to run at cluster start, but when I configure it as a init script for the cluster it returns an error. Here's how I have attached the init script to my cluster,
  <a href="https://i.stack.imgur.com/I8b9E.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/I8b9E.png" alt="enter image description here" /></a></p>
  <p>The error look like this,
  <a href="https://i.stack.imgur.com/lnaCc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lnaCc.png" alt="enter image description here" /></a></p>
  <p>I found a <a href="https://forums.databricks.com/questions/37303/script-works-on-notebook-but-fails-on-init-script.html" rel="nofollow noreferrer">url</a> discussing the same problem but solution provided here (changing extension of the file from .sh to .bash) doesn't work for me. Please help me fix this issue.</p>