Writing Scripts. Setting up a CGI script can be extremely frustrating. While the basic concepts are simple, there are many steps, and missing any of them will cause your CGI script to fail. The following steps should be sufficient to get your first CGI script up and running in your home directory. Note that this tutorial only covers getting a.