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.

pend_func split_input<br />

pend_release<br />

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

# # # Pairs reported -- Unique list of IP addresses found<br />

echo<br />

_ip_cnt=${#known_address[@]}<br />

if [ ${#list_server[@]} -eq 0 ]<br />

then<br />

echo ’Blacklist server list empty, none checked.’<br />

else<br />

if [ ${_ip_cnt} -eq 0 ]<br />

then<br />

echo ’Known address list empty, none checked.’<br />

else<br />

_ip_cnt=${_ip_cnt}-1 # Start at top.<br />

echo ’Checking Blacklist servers.’<br />

for (( _ip = _ip_cnt ; _ip >= 0 ; _ip-- ))<br />

do<br />

pend_func check_lists $( printf ’%q\n’ ${known_address[$_ip]} )<br />

done<br />

fi<br />

fi<br />

pend_release<br />

$_dot_dump # Graphics file dump<br />

$_log_dump # Execution trace<br />

echo<br />

##############################<br />

# Example output from script #<br />

##############################<br />

:

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

Saved successfully!

Ooh no, something went wrong!