11.04.2013 Views

Guida avanzata di scripting Bash - Portale Posta DMI

Guida avanzata di scripting Bash - Portale Posta DMI

Guida avanzata di scripting Bash - Portale Posta DMI

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

if [ -e "/proc/ide/${<strong>di</strong>sk[$device]}/me<strong>di</strong>a" ] ; \<br />

then hdme<strong>di</strong>a=‘cat /proc/ide/${<strong>di</strong>sk[$device]}/me<strong>di</strong>a‘<br />

...<br />

fi<br />

#<br />

#<br />

if [ ! -n "‘uname -r | grep -- "-"‘" ]; then<br />

ktag="‘cat /proc/version‘"<br />

...<br />

fi<br />

#<br />

#<br />

if [ $usb = "1" ]; then<br />

sleep 5<br />

mouseoutput=‘cat /proc/bus/usb/devices \<br />

2>/dev/null|grep -E "^I.*Cls=03.*Prot=02"‘<br />

kbdoutput=‘cat /proc/bus/usb/devices \<br />

2>/dev/null|grep -E "^I.*Cls=03.*Prot=01"‘<br />

...<br />

fi<br />

Capitolo 14. Sostituzione <strong>di</strong> comando<br />

386

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!