Table-Dir
Tasos Bassoukos
abas at aix.meng.auth.gr
Sat Aug 1 04:27:54 EEST 1998
Kostas Lialiambis wrote:
> Ama kaneis brei pio syntomo tropo gia to idio apotelesma as moy grapsei
> giati to parakatw prepei na einai h 27h prallagh poy ekana shmera...
>
> echo "<center>";
> echo "<table border>";
> echo "<tr><td>Filename<td>ModTime<td>Size";
> for i in $(ls -l|tr -s " "|cut -d " " -f 5,6,7,8,9|tr " " "?");
> do
> echo "<tr><td><a href=\""$(echo $i|cut -d "?" -f 5)\"">"\
> $(echo $i|cut -d "?" -f 5)"\
> <td>"$(echo $i|cut -d "?" -f 3) \
> $(echo $i|cut -d "?" -f 2) \
> $(echo $i|cut -d "?" -f 4)\
> "<td align=right>"$(echo -n $i|cut -d "?" -f 1);
> done;
> echo "</table>";
> echo "</center>"
>
> Kor.
Ax, ax ax.... ma giati ?... ma giati ? Pare gia paradeigam ayto, pou einai se
perl[0][3]:
#!/usr/local/bin/perl -w
opendir DIR,"." or die ;
%files=map {$_=>[lstat $_]}
@files=sort grep !/^\.\.?$/ , readdir DIR;
closedir DIR;
$|=0;
print "<CENTER>\n<TABLE BORDER>\n";
print "<tr><th>Filename<th>ModTime<th>Size</TR>\n";
foreach $i (@files) {
print "<tr><td><a href=\"$i\">$i<td align=right><tt>",
sprintf("%3s %2d %3s %4s",
(split(/ +/,localtime($files{$i}[9]) . ""))[0,2,1,4]),
"<tt><td align=right>$files{$i}[7]\n";
}
print "</TABLE></CENTER>\n";
exit 0;
Mallon prepei na kanei thn douleia pou 8es, kai kapou 16 fores pio grhgora[2].
Tassos
[0] perl is a write-only language [1]
[1] den 8ymamai apo poion.
[2] oxi oti to metrhsa..... :)
[3] kai einai kai eyanagnwsto! [0]
--
Bassoukos Tassos
Beat me. Whip me. Make me admin AIX. - Gary Barnes in ASR
--
====================================================================
Gia boithia (h na diagrafhte) e-mail sto majordomo at argos.hol.gr
Ta archives tis listas einai sto http://www.argos.hol.gr/lists :
prin steilete kapoia erothsh psakte mipos exei hdh apanththei.
Gia opoiodipote problima stilte e-mail ston owner-linux-greek-users
====================================================================
More information about the Linux-greek-users
mailing list