Dsy Network www | forum | my | didattica | howto | wiki | el goog | stats | blog | dona | rappresentanti
Homepage
 Register   Calendar   Members  Faq   Search  Logout 
.dsy:it. : Powered by vBulletin version 2.3.1 .dsy:it. > Didattica > Corsi N - Z > Sistemi operativi I > Esame di laboratorio (Giugno 2007) - Domande Thread Rating: 3 votes, 5.00 average.
Pages (571): « First ... « 517 518 519 520 [521] 522 523 524 525 » ... Last »   Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
-Oblivion-
.primate.

User info:
Registered: Nov 2006
Posts: 67 (0.01 al dì)
Location: Seriate
Corso: Informatica
Anno: Quarto [Furoi corso]
Time Online: 22:52:11 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Salve gente, ho un problema con il ciclo while.
CI sto sbattendo la testa da 3 giorni e magari è una stupidata.

Quando ho un codice di questo tipo

PHP:

#!/bin/sh
pippo="topolino"
cat file.txt | while read I 
do 

pippo = "cane"
echo $pippo

done 

echo $pippo



( il comando antecedente al while è di esempio)

Il codice cosa fa ENTRA nel ciclo while stampa il contenuto di pippo ( ovvero cane), esce da ciclo while, stampa nuovamente il contenuto di pippo, ma invece di stampare cane, stampa TOPOLINO!!!!

In pratica (testato e ritestato) tutte le variabile utilizzate nel ciclo while, non vanno a sovrascrivere quelle fuori dal ciclo! E' assurdo.
Questo invece non avviene nei cicli for. Perchpè? Avete riscontrato anche voi?

__________________
Annunci Gratis : La nuova dimensione degli annuci online - Jabbi.it

15-09-2010 12:04
Click Here to See the Profile for -Oblivion- Click here to Send -Oblivion- a Private Message Visit -Oblivion-'s homepage! Find more posts by -Oblivion- Add -Oblivion- to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 12:28.    Post New Thread    Post A Reply
Pages (571): « First ... « 517 518 519 520 [521] 522 523 524 525 » ... Last »   Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread | Add to Bookmarks

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is ON
 

Powered by: vBulletin v2.3.1 - Copyright ©2000 - 2002, Jelsoft Enterprises Limited
Mantained by dsy crew (email) | Collabora con noi | Segnalaci un bug | Archive | Regolamento | Licenze | Thanks | Syndacate
Pagina generata in 0.070 seconds (54.01% PHP - 45.99% MySQL) con 24 query.