computer life iteration [was: Èåìá bash iteration]

Giorgos Keramidas keramida at ceid.upatras.gr
Wed Oct 18 17:56:28 EEST 2006


On 2006-10-18 17:46, Nick Demou <ndemou at gmail.com> wrote:
> Ôçí 18/10/2006, Giorgos Keramidas <keramida at ceid.upatras.gr> Ýãñáøå:
> >×å÷å÷å!  Åãþ ðñùôïäïýëåøá óå /bin/sh óå SunOS 4.X.  Ïôáí ìåñéêïýò ìÞíåò
> >áñãüôåñá ðÞñá äéêü ìïõ PC (Ýíá 386DX33 ôüôå), êáé åßäá ôï COMMAND.COM,
> >ìðïñåßò íá öáíôáóôåßò ôï ìÝãåèïò ôïõ ðïëéôéóìéêïý shock :)
>
> ÷á÷á! óå öáíôÜæïìå íá øá÷íåéò íá âñåéò ôï sh.exe ãéá íá äïõëÝøåéò óáí 
> Üíèñùðïò

Áóå Üóå.  Öñßêç.  ÈõìÜìáé áêüìá ôçí ðñþôç ìïõ áíôßäñáóç üôáí êáôÜëáâá
üôé ôá 'pipes' äåí Þôáí áõôü áêñéâþò ðïõ Þîåñá, áëëÜ ïé åíôïëÝò ôïõ
óôõë:

    C:\> FOO | BAR

Ýôñå÷áí *ðñþôá* ôï 'FOO', Ýóùæáí ôï output óå Ýíá temporary file, êáé
ìåôÜ Ýôñå÷áí ÌÏÍÏ ôï 'BAR' ìå input redirection, Ýôóé þóôå íá äéáâÜæåé
áðü ôï temporary file.

ÖáíôÜóïõ íá èåò íá ãñÜøåéò Ýíá ðñüãñáììá ðïõ öéëôñÜñåé ôïõò ðñþôïõò
áñéèìïýò ðïõ ôåëåéþíïõí óå '3'.  Êáé íá áíáêáëýðôåéò üôé ðñÝðåé ðñþôá íá
ðåñéìÝíåéò íá ãåìßóåé ï äßóêïò óïõ ìå üëïõò ôïõò ðñþôïõò áðü 1 .. N,
ðñéí êáí áñ÷ßóåé ôï öéëôñÜñéóìá.

Êé áõôü Þôáí *Ýíá* áðü ôá ðñÜãìáôá ðïõ `Ýëåéðáí'.  ÕðÞñ÷áí Ýíá óùñü
Üëëá.  Memory allocation ìå ðÜíù áðü 64 KB ìÝãåèïò, utilities üðùò ôá
sed/awk, parent-child process separation (Ýôóé þóôå íá ìçí äéáëýåé ôï
Ýíá process ôï 'environment' ôïõ Üëëïõ), êëð. êëð.

ÐñáãìáôéêÜ, Þôáí 'shock'! :P

> Tþñá ðïõ ôï óêÝöôïìå óå ðïëëÜ óçìåßá ç äéêÞ ìïõ åìðåéñßá óôïõò Ç/Õ
> äéáãñÜöåé ìéá ðáñÜäïîç ðïñåßá "åêêéíçóç... åìðñüò... ïðéóèïäñüìçóç
> ëüãù dos/windows... îáíÜ áðü ôçí áñ÷Þ ìå ôï linux".  ÐáñÜäåéãìá:
> Ï ðñþôïò ìïõ Ç/Õ Þôáí Ýíáò Acorn Electron ðïõ ìðïýôáñå óå basic
> interpreter. To shell Þôáí ç éäéá ç Basic êáé öõóéêÜ Þôáí
> super-scriptable. Ðïëý software Þôáí åðßóçò open source ( ü÷é üìùò ôá
> ðáé÷íßäéá ðïõ ôá áãüñáæåò óå êáóÝôåò ôüôå :-) ).

:)

> ÌåôÜ ðÝöôù ìå ôá ìïýôñá óôï DOS, ìåôÜ óôá windows êáé åäþ êáé 1-2
> ÷ñüíéá åðéóôñÝöù óå open source ìå super-scriptable shell!
> 
> Íá êÜíù ìýíçóç ãéá ôï ÷áìÝíï ÷ñüíï Þ èá åßíáé... ÷áìÝíïò ÷ñüíïò :-)

¸ëá íôå...




More information about the Linux-greek-users mailing list