![]() |
|
|
google unix.com
|
|||||||
| Forum | Registrati | Regole Forum | Collegamenti | Album | FAQ | Members List | Calendario | Ricerca | Today's Posts | Mark Forums Read |
| Shell scripting e di programmazione Pubblica domande su KSH, CSH, SH, Bash, Perl, PHP, sed, awk e da altri script di shell e linguaggi di scripting shell qui. |
Più di UNIX e Linux Forum Argomenti potreste trovare utili
|
||||
| Filo | Thread Starter | Forum | Risposte | Ultimo Post |
| Come conservare i valori in un file in un array | risshanth | UNIX for Dummies Domande & Risposte | 3 | 01-22-2008 10:34 AM |
| Come leggere dal file txt e l'uso che, come un array | Pinky | UNIX for Dummies Domande & Risposte | 4 | 10-08-2007 01:18 AM |
| creare array di caratteri di partecipazione sring then echo array. | rorey_breaker | Shell scripting e di programmazione | 5 | 09-28-2007 09:42 AM |
| Dump un array in un file | IMD | Shell scripting e di programmazione | 3 | 08-31-2006 11:04 AM |
| File di Array e Indietro. | Boucho | Di programmazione ad alto livello | 1 | 02-14-2006 11:32 AM |
![]() |
|
|
LinkBack | Thread Tools | Cerca in questo Thread | Rate Thread | Modalità di visualizzazione |
|
|
|
||||
|
Da file di Array
Ciao a tutti,
Voglio lasciare il record da un file in un array. Che approccio posso usare? ad esempio, soruce_file: aaa bbb ccc array: arr [0] \u003d aaa arr [1] \u003d bbb arr [2] \u003d ccc Grazie, Rock |
|
||||
|
Vorrei dare per garantito che aveva chiesto a perl ![]() Codice:
#! /opt/third-party/bin/perl
open(FILE, "< filename") || die "Unable to open file. <$!>\n";
while( chomp($content = <FILE>) ) {
push(@arr1, $content);
}
#If this needs to be displayed
foreach my $var(@arr1) {
print "$var\n";
}
close(FILE);
exit 0
|
![]() |
| Segnalibri |
| Thread Tools | Cerca in questo Thread |
| Modalità di visualizzazione | Vota questo thread |
|
|