I don't know how this is supposed to work, but in the above command, only the "echo" command ran with sudo, the part after ">" as a simple user, so won't be able to write anything in the wakeup file (besides, a single ">" would have overwritten the file if it worked).
Originally Posted by mindpulse
You may try-
..if I understand correctly what you wanted to do with it.
echo "LID" | sudo tee -a /proc/acpi/wakeup
There is an acpi even configuration file "/etc/acpi/events/lidbtn" that calls a script "/etc/acpi/lid.sh" whenever the lid is opened or closed. You maybe able to modify the configuration file (something with "action=") or with the script itself to make it do what you want.