1 |
scen 08/01/09 20:29:42 |
2 |
|
3 |
Modified: l-awk1.xml |
4 |
Log: |
5 |
Version 1.4, revision 1.8 of EN CVS |
6 |
|
7 |
Revision Changes Path |
8 |
1.3 xml/htdocs/doc/it/articles/l-awk1.xml |
9 |
|
10 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/it/articles/l-awk1.xml?rev=1.3&view=markup |
11 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/it/articles/l-awk1.xml?rev=1.3&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/it/articles/l-awk1.xml?r1=1.2&r2=1.3 |
13 |
|
14 |
Index: l-awk1.xml |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/it/articles/l-awk1.xml,v |
17 |
retrieving revision 1.2 |
18 |
retrieving revision 1.3 |
19 |
diff -u -r1.2 -r1.3 |
20 |
--- l-awk1.xml 21 Oct 2005 12:59:44 -0000 1.2 |
21 |
+++ l-awk1.xml 9 Jan 2008 20:29:42 -0000 1.3 |
22 |
@@ -1,5 +1,5 @@ |
23 |
<?xml version='1.0' encoding="UTF-8"?> |
24 |
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/it/articles/l-awk1.xml,v 1.2 2005/10/21 12:59:44 so Exp $ --> |
25 |
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/it/articles/l-awk1.xml,v 1.3 2008/01/09 20:29:42 scen Exp $ --> |
26 |
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
27 |
|
28 |
<guide link="/doc/it/articles/l-awk1.xml" lang="it" disclaimer="articles"> |
29 |
@@ -26,8 +26,8 @@ |
30 |
documento è una versione aggiornata dell'articolo originale, e contiene |
31 |
numerosi miglioramenti apportati dal Gentoo Linux Documentation team. --> |
32 |
|
33 |
-<version>1.3</version> |
34 |
-<date>2005-10-09</date> |
35 |
+<version>1.4</version> |
36 |
+<date>2008-01-08</date> |
37 |
|
38 |
<chapter> |
39 |
<title>Un'introduzione ad un grande linguaggio dal nome bizzarro</title> |
40 |
@@ -62,14 +62,18 @@ |
41 |
<title>Il primo codice awk</title> |
42 |
<body> |
43 |
|
44 |
+<pre caption="Il primo awk"> |
45 |
+$ <i>awk '{ print }' /etc/passwd</i> |
46 |
+</pre> |
47 |
+ |
48 |
<p> |
49 |
Dovreste vedervi apparire di fronte ai vostri occhi il contenuto del vostro |
50 |
file <path>/etc/passwd</path>. Ora, ecco una spiegazione di cosa ha fatto awk. |
51 |
Quando abbiamo chiamato awk, abbiamo specificato come file di ingresso |
52 |
<path>/etc/passwd</path>. Quando abbiamo eseguito awk, esso ha valutato il |
53 |
-comando print per ciascuna linea del file <path>/etc/passwd</path>, in |
54 |
-ordine. L'uscita è diretta allo standard output e otteniamo un risultato |
55 |
-identico a eseguire <c>cat /etc/passwd</c>. |
56 |
+comando print per ciascuna linea del file <path>/etc/passwd</path>, in ordine. |
57 |
+L'uscita è diretta allo standard output e otteniamo un risultato identico a |
58 |
+eseguire <c>cat /etc/passwd</c>. |
59 |
</p> |
60 |
|
61 |
<p> |
62 |
@@ -205,9 +209,9 @@ |
63 |
<body> |
64 |
|
65 |
<pre caption="if"> |
66 |
-{ |
67 |
- if ( $5 ~ /root/ ) { |
68 |
- print $3 |
69 |
+{ |
70 |
+ if ( $5 ~ /root/ ) { |
71 |
+ print $3 |
72 |
} |
73 |
} |
74 |
</pre> |
75 |
@@ -256,7 +260,7 @@ |
76 |
</p> |
77 |
|
78 |
<pre caption="Stampare i campi uguali a foo e bar"> |
79 |
-( $1 == "foo" ) && ( $2 == "bar" ) { print } |
80 |
+( $1 == "foo" ) && ( $2 == "bar" ) { print } |
81 |
</pre> |
82 |
|
83 |
<p> |
84 |
@@ -373,7 +377,7 @@ |
85 |
<pre caption="Numero di campi"> |
86 |
{ |
87 |
if ( NF > 2 ) { |
88 |
- print $1 " " $2 ":" $3 |
89 |
+ print $1 " " $2 ":" $3 |
90 |
} |
91 |
} |
92 |
</pre> |
93 |
|
94 |
|
95 |
|
96 |
-- |
97 |
gentoo-commits@l.g.o mailing list |