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.

}<br />

if [ ! -e ${SPAMMER_TRACE} ]<br />

then<br />

if ! touch ${SPAMMER_TRACE} 2>/dev/null<br />

then<br />

pend_func echo $(printf ’%q\n’ \<br />

’Unable to create log file >’${SPAMMER_TRACE}’’${SPAMMER_TRACE}’ ${_log_file}<br />

_pend_hook_=trace_logger<br />

_log_dump=dump_log<br />

fi<br />

fi<br />

return 0<br />

Appen<strong>di</strong>ce A. Script aggiuntivi<br />

# User environment variable SPAMMER_DATA<br />

data_capture() {<br />

if [ ${SPAMMER_DATA:=} ] # Wants a data dump?<br />

then<br />

if [ ! -e ${SPAMMER_DATA} ]<br />

then<br />

if ! touch ${SPAMMER_DATA} 2>/dev/null<br />

then<br />

pend_func echo $(printf ’%q]n’ \<br />

’Unable to create data output file >’${SPAMMER_DATA}’’${SPAMMER_DATA}’

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

Saved successfully!

Ooh no, something went wrong!