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.

# Grazie, S.C.<br />

exit 0<br />

Capitolo 19. Espressioni Regolari<br />

2. Espanione del nome del file significa completare un nome <strong>di</strong> file che contiene caratteri speciali. Prt<br />

esempio, esempio.??? potrebbe espandersi a esempio.001 e/o esempio.txt.<br />

3. L’espansione del nome del file può verificare i nomi <strong>di</strong> file che iniziano con il punto, ma solo se il<br />

modello lo include esplicitamente con il suo valore letterale.<br />

~/[.]bashrc # Non viene espanso a ~/.bashrc<br />

~/?bashrc # Neanche in questo caso.<br />

# Nel globbing i caratteri jolly e i metacaratteri NON<br />

#+ espandono il punto.<br />

~/.[b]ashrc # Viene espanso a ~./bashrc<br />

~/.ba?hrc # Idem.<br />

~/.bashr* # Idem.<br />

# Impostando l’opzione "dotglob" si abilita anche l’espansione del punto.<br />

# Grazie, S.C.<br />

433

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

Saved successfully!

Ooh no, something went wrong!