Nice try
importante: /proc/acpi/wakeup is being depricated, you should look into this.
You can write directly to wakeup without a seperate script.
awk '/enabled/{if ($1 !~ /PBTN|LID|SLPB/) print $1}' /proc/acpi/wakeup > /proc/acpi/wakeup
Edit: and that did not work , this does but its sloppy:
for i in `/usr/bin/awk '/enabled/{if ($1 !~ /PBTN|LID|SLPB/) print $1}' /proc/acpi/wakeup`;do echo $i|tee /proc/acpi/wakeup;done
Good luck!
And take a look at this,