Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/awk -f
- # Tema d'esame 07/07/2005 (www.labinf.polito.it/whitone/index.php?summ=SO)
- # Uso: awk -f uppertwelve.awk parole.txt
- # 15/08/2012 - BNCRCR
- # Cose da fare per ogni riga
- {
- for (i = 1; i <= NF; i++) {
- if (length($i) > 12)
- $i = toupper($i)
- printf("%s ", $i) >> "output.tmp"
- }
- printf("\n") >> "output.tmp"
- }
- END {
- # Eseguito solo quando leggo EOF nel file di input
- comando = "cat output.tmp > " FILENAME
- system(comando)
- system("rm -f output.tmp")
- }
- # == parole.txt ==
- # ciao sono un file di testo con alcune parole lunghe, tipo pedissequamente
- # per non parlare poi di informalmente
- # e avete sentito poi il vicepresidente?
- # vabbè.
Advertisement
Add Comment
Please, Sign In to add comment