enoxlisi?

Aleksandros Paleos apalaios at cs.teiath.gr
Sun May 4 20:14:01 EEST 2003


Ksero oti poli tha enoxlitheite me ayto pou rotao , alla opou kai ean epsaksa 
kai osous kai ean rotisa den mou brike kaneis apantisi. Psaxno na bro tin 
apantisi se mia ergasia kai den ksero se kammia periptosi ti lisi 
tis...Prospastho edo kai kati meres kano diafora , diabazo ksana kai ksana 
alla den mporo

I askisi leei ta eksis exoume 2 arxeia
to ena onomazetai last
kai exei tin parakato grammografisi
Username 	tty	day	month	date	Time-in	Time-out
Kostas	       tt0     Sun  Feb          27          13:04        17:21
.....................................

Exoume episis kai allo ena me to onoma allow me gromografisi
Username	tty	day	month	date	Time-in		Time-out
To arxeio ayto periexei tis ores pou mporei enas xristis na syndeetai sto 
systima mas.
To zitoumeno loipon einai na grapsoume ena awk file pou pairnei san pedia 
eisodou ta 2 parapano kai  an kapoios xristis prospathei na apoktisei prosbasi 
apo to sistima 
mas se ores i apo termatiko pou den epitrepontai kai na emfanizei ena minima 
sto diaxeiristi me to onoma toy xristi kai tin ora pou prospathise na mpei 
kai ti diarkeia paramonis toy

I parapano loipon einai i ekfonisi tis askisis. Skeftika arxika na kano to 
eksis na kano elegxous gia kathe xristi tin ora pou mpike-mpainei me tis ores 
tou arxeiou allow. Kapou edo kollisa giati paratirisa sto awk oti otan 
allazei arxeio ta $1,$2 den synexizoun san noumera alla ksanarxizoun apo tin 
arxi . Etsi loipon den mporo na kano kammia sygkrisi toy typoy $2>=$9 .
Boithiste me kati na katafero sas parakalo , oli i ypothesi mou thymizei 
prosetairistikous pinakes......
Kai kati akoma sto awk file mou grafo
BEGIN {a=FILENAME}
{
if (a!=FILENAME)
   {
        print "allaksa arxeio"
        a=FILENAME
   }
......klp klp
me to pou grafo sto shell(bash)
awk -f myawk last allow
me ti mia mou grafei allaksa arxeio
Giati to kanei ayto. Pisteyo oti prepei na douleyei kapos etsi afou to a einai 
sto BEGIN pairnei tin timi a=LAST
Kanei itn sygkrisi LAST!=LAST kai den emfanizei tipota. Ayto to eixa grapsei 
giati ithela na do se poio simeio allazei to arxeio . Kai ontos otan allaksei 
to arxeio mou to grafei to minima. Mou to grafei loipon 2 fores synolika mia 
stin arxi arxi kai mia stin allagi tou arxeioy . Pos dikaiologeitai tin 
proti?
Eyxaristo poly se osous kanane ton kopo kai diabasane mexri edo , basika exo 
tromeri anagki apo boitheia, giati o kathigitis mou den einai synergasimos 
sto bathmo pou tha prepe.



-- 
Παλαιος Αλεξανδρος
Φοιτητης ΤΕΙ Πληροφορικης Αθηνας



More information about the Linux-greek-users mailing list