[LUGOS-PROG] Skripta

Matija Grabnar matija.grabnar at arnes.si
Tue Feb 5 09:04:10 CET 2002


pero13667 at yahoo.com said:
> Rad bi bral iz "/proc/acpi/event" in ko bi dobil button  "power
> 00000080 00000000" naj se pozene "/sbin/halt" (al pa "mpg123
> cant_touch_this.mp3" :))))))) 

Se pravi nekaj takega:
 #!/usr/bin/perl -w
open(IN,"</proc/acpi/event");
while (<IN>) {
    system("/sbin/halt") if ($_ eq 'power 00000080 00000000\n');
}





More information about the lugos-prog mailing list