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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

# Just gone, no hints, no runs, no errors.<br />

# Why in the world?<br />

# Setting the contents of a string variable containing character<br />

#+ sequences that have a meaning in <strong>Bash</strong> is a general problem in<br />

#+ script programming.<br />

#<br />

# This problem is now solved in eight lines of code<br />

#+ (and four pages of description).<br />

# Where is all this going?<br />

# Dynamic content Web pages as an array of <strong>Bash</strong> strings.<br />

# Content set per request by a <strong>Bash</strong> ’eval’ command<br />

#+ on the stored page template.<br />

# Not intended to replace PHP, just an interesting thing to do.<br />

###<br />

# Don’t have a webserver application?<br />

# No problem, check the example <strong>di</strong>rectory of the <strong>Bash</strong> source;<br />

#+ there is a <strong>Bash</strong> script for that also.<br />

# _UnProtect_Literal_String_Test<br />

# # # Remove the above "# " to <strong>di</strong>sable this code. # # #<br />

exit 0<br />

Questo è uno script molto potente che aiuta a scovare gli spammer.<br />

Esempio A-27. Identificare uno spammer<br />

#!/bin/bash<br />

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

# $Id: is_spammer.bash,v 1.12.2.11 2004/10/01 21:42:33 mszick Exp $<br />

# Above line is RCS info.<br />

# The latest version of this script is available from http://www.morethan.org.<br />

#<br />

# Spammer-identification<br />

# by Michael S. Zick<br />

# Used in the ABS Guide with permission.<br />

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

# Documentation<br />

# See also "Quickstart" at end of script.<br />

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

:

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

Saved successfully!

Ooh no, something went wrong!