Need help with bash script to delete El Capitan Installer
If you didn't install any BlockElCapitanLaunchDaemon.pkg previously, but just got the content of the plist and the shell script you will get this working by removing some useless lines and bogus commands:

A working version is:

#!/bin/bash

Version=$(sw_vers | grep ProductVersion | tail -c 7 | cut -d . -f 2)    

if [[ $Version -ge 11 ]]
then
    launchctl unload /Library/LaunchDaemons/net.company_name.blockelcapitan.plist
    rm -f /Library/LaunchDaemons/net.company_name.blockelcapitan.plist
    rm -f /usr/local/bin/blockelcapitan.sh
    exit 0
else
    rm -rf /Applications/Install\ OS\ X\ El\ Capitan.app/
fi


The Variable Version can be simplified to:

Version=$(sw_vers -productVersion | cut -d . -f 2 )


The related launch daemon plist net.company_name.blockelcapitan.plist added to your question is properly formatted and working after changing the line      &lt;string&gt;net.ORG.blockelcapitan&lt;/string&gt; to    &lt;string&gt;net.company_name.blockelcapitan&lt;/string&gt;.

The files ought to have the following permissions:


blockelcapitan.sh: root:wheel 755
net.company_name.blockelcapitan.plist: root:wheel 644


The script does the following:


Version=$(sw_vers | grep ProductVersion | tail -c 7 | cut -d . -f 2) or Version=$(sw_vers -productVersion | cut -d . -f 2 ):
Get the major release number of the current system version (e.g. 9: Mavericks, 10: Yosemite, 11: El Capitan etc.)
if [[ $Version -ge 11 ]]:
if the major version of the booted system is equal or greater than 11
then... 
(if El Capitan or newer is installed) unload and remove the launch daemon and the shell script
else...
(if Yosemite or older is installed) remove El Capitan installer app


None of the preceding sudos is needed, because the shell script started by the launch daemon already runs as root. The -r option in the first rm commands is not needed because none of the objects is a directory. The files and folder in /var don't exist if you haven't installed anything (except the plist and the shell script file).

As far as I can tell, the osascript doesn't work like that, so I ignored it. I'll try to find a solution.