Tuesday 22 June 2010

Well apologies to Shakespeare but I've been experimenting with Awk (Gawk)
a programming langauge for matching patterns and sortig texts which is also quite fun
for generative text, here
printing only lines with progressively less than a certain number of characters
C:\Program Files\GnuWin32\bin>awk "length <>

When in disgrace with fortune and menÆs eyes
I all alone beweep my outcast state,
And trouble deaf heaven with my bootless cries,
And look upon myself, and curse my fate,
Wishing me like to one more rich in hope,
FeaturÆd like him, like him with friends possessÆd,
Desiring this manÆs art, and that manÆs scope,
With what I most enjoy contented least;
Yet in these thoughts myself almost despising,
Haply I think on thee,ùand then my state,
Like to the lark at break of day arising
From sullen earth,
sings hymns at heavenÆs gate;
For thy sweet love rememberÆd such wealth brings
That then I scorn to change my state with kings.



C:\Program Files\GnuWin32\bin>awk "length <54">awk "length <44" shak.txt

I all alone beweep my outcast state,
And look upon myself, and curse my fate,
Wishing me like to one more rich in hope,
With what I most enjoy contented least;
Haply I think on thee,ùand then my state,
Like to the lark at break of day arising


No comments:

Post a Comment