[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: e' possibile farlo in bash???



Alle 12:30, mercoledì 21 luglio 2004, Gandu ha scritto:

> $testo = file_get_contents("./testo.txt");
>
> $intestazioni = explode("\n", $testo);
> $titolo = $intestazioni[0];
titolo = `head -1 testo.txt`
> $tipo = $intestazioni[1];
tipo = `sed -e '1d' testo.txt | head -1`
> $data = $intestazioni[2];
data = `sed -e '2d' testo.txt | head -1` 
> $nomefile = $data.".".$tipo.".".$titolo.".txt";
nomefile = $data+'.'+$tipo+'.'+$titolo

P.S.: non testato.
-- 
A presto
-Valerio-



Reply to: