Mia mikrh apogohteush

Alexios Chouchoulas alexios at vennea.demon.co.uk
Sun Mar 2 00:31:26 EET 1997


> Kalo to fips alla exei ana8ema tous periorismous,splitarei mono primary
> partitions,an exeis panw apo 3 partitions tote den mporei na splittarei to
> primary.

  Nai, dekto afto. Na sou pw thn amartia mou protimw na einai teleiws
paranoid to programma kai na mhn paizei me pragmata pou den einai SIGOUPO
oti mporei na xeiristei, para na mou kanei to disko Bill Gates kai na mou to
pei amesws afou sbhsei kai to undo file. :-)

  Yparxei kai ena Ellhniko antistoixo programma, onomati Presizer. Den kserw
parapanw leptomereies kai den to exw doulepsei. Kserw oti exei ki afto ta
problhmata tou, alla ap'oti akouw doulevei kala.



> Exw se mia disketta 5.25 ena programma gia thn idia akribws douleia
> pou legetai presizer,an to 8elei kaneis 8a prospa8hsw na brw atomo me 5.25
> drive na to parw.

  :-)   Nai, xm, prepei na diabazw olo to mhnyma prin grapsw thn apanthsh.


> > # Den peirazoume arxeia pou yparxoun hdh.
> >
> > if [ -e $fname ]; then
> >         echo File $fname already exists.
> >         exit
>
> Pairnontas aformh apo to parapanw bash script h8ela na kanw kana duo erwthseis.
> Koita3a sto bash(1) alla den brhka tipota sxetika me parametrous tou if opws h
> parapanw (if [ -e mplampla ] kai if [ -z mplampla ] kai paromoies).Exei kaneis
> upopshn tou pou mporw na brw plhrofories?

  Einai hackia. Den yparxei syntaksh 'if [ blah blah ];'. Alla to '[' einai
symlink/shell builtin pou deixnei pros to test(1). Kane man test kai tha
diafwtisteis. Ara, otan grafoume if [ -e mpongka ]; einai san na grafoume if
test -s mpongka; H kleisth agkylh yparxei gia logous isorropias.


> Epishs,uparxei dunatothta se shell (bash kata protimhsh) script na afairesw
> apo th mesh enos keimenou thn grammh noumero "tade" n' th grammh pou periexei
> to "tade" string?An nai,pmia suntomh perigrafh 8a mou htan polutimh.

Rikse mia matia sto grep kai sygkekrimena sto argument -v (reVerse). Ena
"grep -v leksoula" tha sou deiksei olo to input ektos apo tis grammes pou
periexoun thn leksoula.

Gia na afaireseis sygkekrimenes grammes basei arithmou grammhs, mporeis na
paikseis me tis head(1)/tail(1)/cat(1):

$ head -41 fname; tail +43 fname

  To parapanw afairei thn grammh 42 apo to arxeio fname. Meionekthmata: den
doulevei ws filtro kai exei eidikes periptwseis (otan afaireis thn prwth h
thn teleftaia grammh, an kai toulaxiston oi GNU ekdoseis kseroun na
xeiristoun -0 h +0 parametrous).

  Dokimase to parakatw pou einai pio glykouliko, kai doulevei kai ws filtro.
Fysika mporeis na kaneis to idio pragma me dekades tropous.

$ gawk -- '{ if (NR!=42) print $0 }'   # Afairei thn grammh 42


A.

Alexios Chouchoulas          '88    ,88'   ,88'     alexios at vennea.demon.co.uk
The Unpronouncable One      ,o88oooo88ooooo88oo,              axc at dcs.ed.ac.uk
==================================================================
For help on using this list (linux-greek-users), send a message to
"majordomo at argeas.argos.hol.gr" with one line of text: "help".
For any problem send e-mail to owner-linux-greek-users
==================================================================



More information about the Linux-greek-users mailing list