title: Echo a large chunk of text to a file using Bash
body: <p>I need to run a Bash script that can echo a 300 lines of Groovy script to a tmp file.
  What's the best way to do it ? </p>
  
  <p>My current workaround is putting the script file online and download it.</p>