[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

awk was RE: [linux-team] Humour :"Hello World"



et ou on peut trouver un petit tutorial a propos de awk ?
a part la man page qui ne dit pas grand chose sur cette commande qui peut
être bien pratique 

> -----Original Message-----
> From: Pascal Bleser [mailto:pbleser@atos-group.com]
> Sent: Wednesday 6 October 1999 10:56
> To: linux-team@rtfm.be
> Subject: Re: [linux-team] Humour :"Hello World"
> 
> 
> On Wed, Oct 06, 1999 at 10:45:25AM +0200, Pascal A. Dupuis wrote:
> > On Wed, 6 Oct 1999, Pascal Bleser wrote:
> > > On Wed, Oct 06, 1999 at 09:59:04AM +0200, Pascal A. Dupuis wrote:
> > > > On Tue, 5 Oct 1999, Damien Cornet wrote:
> > > > > Enoncé : Le but de la manipulation est d'écrire un 
> programme qui
> > > > > affichera "HELLO WORLD" à l'écran.
> > > > Dinosaure atypique :
> > > > 	echo | awk '{print "HELLO WORLD";}'
> > > Sans "echo" quand même :)
> > Ah, ben si, justement. awk attends un nom de programme, et 
> par défaut lit
> > stdin. Donc, sans echo, on a :
> > awk '{print "HELLO WORLD";}' ""
> > [taper sur Enter]
> > HELLO WORLD
> > [^D]
> > > (programme terminé) 
> ah oui, juste! :)
> bah, tu peux aussi faire:
>  awk 'BEGIN{print "hello world"}'
> ;-)
> 
> > > > Il manque dans la liste :
> > > > -programme sous Win32 
> > > alors là, tu n'espères quand même pas que je vais vendre mon âme
> > > juste pour faire un hello world ;-)
> > Je trouve amusant le point d'entrée d'un programme sous 
> Win32. Si je me
> > souviens bien, cela ressemble à:
> > int far Pascal winmain(hInstance PreviousInstance, 
> hInstance Instance)
> > ou quelque chose comme cela. Que les puristes me corrigent.
> "puristes" ? :-)
> 
> > > > -python
> > > #!/usr/bin/python
> > > print "Hello World\n"
> > 
> > > > -perl
> > > #!/usr/bin/perl
> > > print "Hello World\n";
> > > 1;
> > > 
> > > bah, trop facile ;-)
> > Et en 'one-liner?' 
> perl -e 'print "Hello World\n"'
> python -c 'print "hello world"'
> 
> > > A part ça...
> > > qqn sait faire du LISP ? :-))
> > Yen a déjà :
> > (defun HELLO(print (cons 'HELLO (list 'WORLD))))
> de fait ;-)
> 
> > Tiens, et en Fortran 77 ?  [Me souviens plus bien]
> > 10      WRITE(6,20)
> > 20      FORMAT("HELLO WORLD") 
> whahaha :-)
> On en a oublié un de terrible : COBOL :-)
> Mais chais plus très bien... j'ai vite effacé ça de ma mémoire ;-)
> 
> -- 
>   -o) / Pascal Bleser          ATOS Payment Systems|
>   /\\ \ C++/UNIX Development        Aachen, Germany|
>  _\_v  \<guru@linuxbe.org> <pbleser@atos-group.com>|
> ---------------------------------------------------|
> Linux - Less bugs for less bucks!
> ---------------------------------------------------'
> 
> ---------
> Visit the Linux Supertore Online: http://www.redcorp.com !
> If you want to be deleted from the list, send a mail to
> majordomo@rtfm.be with "unsubscribe linux-team" in the body.
> 

**** DISCLAIMER **** 
"This e-mail and any attachments thereto may contain information 
which is confidential and/or protected by intellectual property 
rights and are intended for the sole use of the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, 
total or partial reproduction, communication or distribution in any form) 
by persons other than the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either 
by telephone or by e-mail and delete the material from any computer. 
Thank you for your cooperation."

---------
Visit the Linux Supertore Online: http://www.redcorp.com !
If you want to be deleted from the list, send a mail to
majordomo@rtfm.be with "unsubscribe linux-team" in the body.