How to add startup program using Terminal?
LaunchDaemons – Run at Boot

LaunchAgents – Run at Login

So... you need a daemon

suggest you to cat /System/Library/LaunchDaemons/com.apple.pfctl.plist or any other in the same dir and use it as reference.

Just remove unnecessary. It will be something like this:

&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
&lt;plist version="1.0"&gt;
&lt;dict&gt;
    &lt;key&gt;Disabled&lt;/key&gt;
    &lt;false/&gt;
    &lt;key&gt;Label&lt;/key&gt;
    &lt;string&gt;shell.sh&lt;/string&gt;
    &lt;key&gt;ProgramArguments&lt;/key&gt;
    &lt;array&gt;
        &lt;string&gt;/path/to/shell.sh&lt;/string&gt;
    &lt;/array&gt;
    &lt;key&gt;RunAtLoad&lt;/key&gt;
    &lt;true/&gt;
&lt;/dict&gt;
&lt;/plist&gt;


save the file in the same dir, but named shell.sh.plist and run 

sudo launchctl load /System/Library/LaunchDaemons/shell.sh.plist

to remove script from the load list:

sudo launchctl unload /System/Library/LaunchDaemons/shell.sh.plist

this is not linux so things are done Mac way.

man launchd &amp; man launchd.plist will provide all needed info

OR 

you can use an approach described here

Creating .plist just once and pointing it to your startup script which in turn will start anything you add there without need to write new .plist every time you want to start something new.