diff --git a/PERL_Language/wc.pl b/PERL_Language/wc.pl deleted file mode 100755 index 50a28bd..0000000 --- a/PERL_Language/wc.pl +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/perl -w - -# This script displays the number of lines in a file - -use strict; - -die "un argument svp ! " if !defined ($ARGV[0]); - -my $i=0; -open(P,"< $ARGV[0]") || die "erreur ouverture $!"; - -while (
)
-{
- $i++;
-}
-close(P);
-print "nb de lignes = $i \n";
diff --git a/C_Language/apres.c b/c/apres.c
similarity index 100%
rename from C_Language/apres.c
rename to c/apres.c
diff --git a/C_Language/cd.c b/c/cd.c
similarity index 100%
rename from C_Language/cd.c
rename to c/cd.c
diff --git a/C_Language/chrono.c b/c/chrono.c
similarity index 100%
rename from C_Language/chrono.c
rename to c/chrono.c
diff --git a/C_Language/cronbis.c b/c/cronbis.c
similarity index 100%
rename from C_Language/cronbis.c
rename to c/cronbis.c
diff --git a/C_Language/eko.c b/c/eko.c
similarity index 100%
rename from C_Language/eko.c
rename to c/eko.c
diff --git a/C_Language/eko2.c b/c/eko2.c
similarity index 100%
rename from C_Language/eko2.c
rename to c/eko2.c
diff --git a/C_Language/exoPointeurs.c b/c/exoPointeurs.c
similarity index 100%
rename from C_Language/exoPointeurs.c
rename to c/exoPointeurs.c
diff --git a/C_Language/function.c b/c/function.c
similarity index 100%
rename from C_Language/function.c
rename to c/function.c
diff --git a/C_Language/lirecharl.c b/c/lirecharl.c
similarity index 100%
rename from C_Language/lirecharl.c
rename to c/lirecharl.c
diff --git a/C_Language/matrice1.c b/c/matrice1.c
similarity index 100%
rename from C_Language/matrice1.c
rename to c/matrice1.c
diff --git a/C_Language/matrice2.c b/c/matrice2.c
similarity index 100%
rename from C_Language/matrice2.c
rename to c/matrice2.c
diff --git a/C_Language/mini_shell.c b/c/mini_shell.c
similarity index 100%
rename from C_Language/mini_shell.c
rename to c/mini_shell.c
diff --git a/C_Language/minmax.c b/c/minmax.c
similarity index 100%
rename from C_Language/minmax.c
rename to c/minmax.c
diff --git a/C_Language/minuscule.c b/c/minuscule.c
similarity index 100%
rename from C_Language/minuscule.c
rename to c/minuscule.c
diff --git a/C_Language/miroir.c b/c/miroir.c
similarity index 100%
rename from C_Language/miroir.c
rename to c/miroir.c
diff --git a/C_Language/monswap.c b/c/monswap.c
similarity index 100%
rename from C_Language/monswap.c
rename to c/monswap.c
diff --git a/C_Language/multiChrono.c b/c/multiChrono.c
similarity index 100%
rename from C_Language/multiChrono.c
rename to c/multiChrono.c
diff --git a/C_Language/palindrome.c b/c/palindrome.c
similarity index 100%
rename from C_Language/palindrome.c
rename to c/palindrome.c
diff --git a/C_Language/printenv.c b/c/printenv.c
similarity index 100%
rename from C_Language/printenv.c
rename to c/printenv.c
diff --git a/C_Language/semaphores_manuel_exemples/Exemple_curses/essaiCurses b/c/semaphores_manuel_exemples/Exemple_curses/essaiCurses
similarity index 100%
rename from C_Language/semaphores_manuel_exemples/Exemple_curses/essaiCurses
rename to c/semaphores_manuel_exemples/Exemple_curses/essaiCurses
diff --git a/C_Language/semaphores_manuel_exemples/Exemple_curses/essaiCurses.doc b/c/semaphores_manuel_exemples/Exemple_curses/essaiCurses.doc
similarity index 100%
rename from C_Language/semaphores_manuel_exemples/Exemple_curses/essaiCurses.doc
rename to c/semaphores_manuel_exemples/Exemple_curses/essaiCurses.doc
diff --git a/C_Language/semaphores_manuel_exemples/Exemple_curses/essaiCurses.pdf b/c/semaphores_manuel_exemples/Exemple_curses/essaiCurses.pdf
similarity index 100%
rename from C_Language/semaphores_manuel_exemples/Exemple_curses/essaiCurses.pdf
rename to c/semaphores_manuel_exemples/Exemple_curses/essaiCurses.pdf
diff --git a/C_Language/semaphores_manuel_exemples/Exemple_curses/essaicurses.c b/c/semaphores_manuel_exemples/Exemple_curses/essaicurses.c
similarity index 100%
rename from C_Language/semaphores_manuel_exemples/Exemple_curses/essaicurses.c
rename to c/semaphores_manuel_exemples/Exemple_curses/essaicurses.c
diff --git a/C_Language/semaphores_manuel_exemples/Exemples_semaphores/a.out b/c/semaphores_manuel_exemples/Exemples_semaphores/a.out
similarity index 100%
rename from C_Language/semaphores_manuel_exemples/Exemples_semaphores/a.out
rename to c/semaphores_manuel_exemples/Exemples_semaphores/a.out
diff --git a/C_Language/semaphores_manuel_exemples/Exemples_semaphores/creaZ b/c/semaphores_manuel_exemples/Exemples_semaphores/creaZ
similarity index 100%
rename from C_Language/semaphores_manuel_exemples/Exemples_semaphores/creaZ
rename to c/semaphores_manuel_exemples/Exemples_semaphores/creaZ
diff --git a/C_Language/semaphores_manuel_exemples/Exemples_semaphores/creaZ.c b/c/semaphores_manuel_exemples/Exemples_semaphores/creaZ.c
similarity index 100%
rename from C_Language/semaphores_manuel_exemples/Exemples_semaphores/creaZ.c
rename to c/semaphores_manuel_exemples/Exemples_semaphores/creaZ.c
diff --git a/C_Language/semaphores_manuel_exemples/Exemples_semaphores/ecrireZ.c b/c/semaphores_manuel_exemples/Exemples_semaphores/ecrireZ.c
similarity index 100%
rename from C_Language/semaphores_manuel_exemples/Exemples_semaphores/ecrireZ.c
rename to c/semaphores_manuel_exemples/Exemples_semaphores/ecrireZ.c
diff --git a/C_Language/semaphores_manuel_exemples/Exemples_semaphores/ecrireZ_Sem b/c/semaphores_manuel_exemples/Exemples_semaphores/ecrireZ_Sem
similarity index 100%
rename from C_Language/semaphores_manuel_exemples/Exemples_semaphores/ecrireZ_Sem
rename to c/semaphores_manuel_exemples/Exemples_semaphores/ecrireZ_Sem
diff --git a/C_Language/semaphores_manuel_exemples/Exemples_semaphores/ecrireZ_Sem.c b/c/semaphores_manuel_exemples/Exemples_semaphores/ecrireZ_Sem.c
similarity index 100%
rename from C_Language/semaphores_manuel_exemples/Exemples_semaphores/ecrireZ_Sem.c
rename to c/semaphores_manuel_exemples/Exemples_semaphores/ecrireZ_Sem.c
diff --git a/C_Language/semaphores_manuel_exemples/Exemples_semaphores/lireZ b/c/semaphores_manuel_exemples/Exemples_semaphores/lireZ
similarity index 100%
rename from C_Language/semaphores_manuel_exemples/Exemples_semaphores/lireZ
rename to c/semaphores_manuel_exemples/Exemples_semaphores/lireZ
diff --git a/C_Language/semaphores_manuel_exemples/Exemples_semaphores/lireZ.c b/c/semaphores_manuel_exemples/Exemples_semaphores/lireZ.c
similarity index 100%
rename from C_Language/semaphores_manuel_exemples/Exemples_semaphores/lireZ.c
rename to c/semaphores_manuel_exemples/Exemples_semaphores/lireZ.c
diff --git a/C_Language/semaphores_manuel_exemples/Exemples_semaphores/raZ b/c/semaphores_manuel_exemples/Exemples_semaphores/raZ
similarity index 100%
rename from C_Language/semaphores_manuel_exemples/Exemples_semaphores/raZ
rename to c/semaphores_manuel_exemples/Exemples_semaphores/raZ
diff --git a/C_Language/semaphores_manuel_exemples/Exemples_semaphores/raZ.c b/c/semaphores_manuel_exemples/Exemples_semaphores/raZ.c
similarity index 100%
rename from C_Language/semaphores_manuel_exemples/Exemples_semaphores/raZ.c
rename to c/semaphores_manuel_exemples/Exemples_semaphores/raZ.c
diff --git a/C_Language/semaphores_manuel_exemples/Exemples_semaphores/sema.c b/c/semaphores_manuel_exemples/Exemples_semaphores/sema.c
similarity index 100%
rename from C_Language/semaphores_manuel_exemples/Exemples_semaphores/sema.c
rename to c/semaphores_manuel_exemples/Exemples_semaphores/sema.c
diff --git a/C_Language/semaphores_manuel_exemples/Exemples_semaphores/sema.h b/c/semaphores_manuel_exemples/Exemples_semaphores/sema.h
similarity index 100%
rename from C_Language/semaphores_manuel_exemples/Exemples_semaphores/sema.h
rename to c/semaphores_manuel_exemples/Exemples_semaphores/sema.h
diff --git a/C_Language/semaphores_manuel_exemples/Exemples_semaphores/sema.o b/c/semaphores_manuel_exemples/Exemples_semaphores/sema.o
similarity index 100%
rename from C_Language/semaphores_manuel_exemples/Exemples_semaphores/sema.o
rename to c/semaphores_manuel_exemples/Exemples_semaphores/sema.o
diff --git a/C_Language/semaphores_manuel_exemples/FileeDeMessage/msgCons.c b/c/semaphores_manuel_exemples/FileeDeMessage/msgCons.c
similarity index 100%
rename from C_Language/semaphores_manuel_exemples/FileeDeMessage/msgCons.c
rename to c/semaphores_manuel_exemples/FileeDeMessage/msgCons.c
diff --git a/C_Language/semaphores_manuel_exemples/FileeDeMessage/msgProd.c b/c/semaphores_manuel_exemples/FileeDeMessage/msgProd.c
similarity index 100%
rename from C_Language/semaphores_manuel_exemples/FileeDeMessage/msgProd.c
rename to c/semaphores_manuel_exemples/FileeDeMessage/msgProd.c
diff --git a/C_Language/semaphores_manuel_exemples/FileeDeMessage/nom2_de_fichier_existant b/c/semaphores_manuel_exemples/FileeDeMessage/nom2_de_fichier_existant
similarity index 100%
rename from C_Language/semaphores_manuel_exemples/FileeDeMessage/nom2_de_fichier_existant
rename to c/semaphores_manuel_exemples/FileeDeMessage/nom2_de_fichier_existant
diff --git a/C_Language/semaphores_manuel_exemples/FileeDeMessage/test_msgctl.c b/c/semaphores_manuel_exemples/FileeDeMessage/test_msgctl.c
similarity index 100%
rename from C_Language/semaphores_manuel_exemples/FileeDeMessage/test_msgctl.c
rename to c/semaphores_manuel_exemples/FileeDeMessage/test_msgctl.c
diff --git a/C_Language/semaphores_manuel_exemples/essaiCurses.pdf b/c/semaphores_manuel_exemples/essaiCurses.pdf
similarity index 100%
rename from C_Language/semaphores_manuel_exemples/essaiCurses.pdf
rename to c/semaphores_manuel_exemples/essaiCurses.pdf
diff --git a/C_Language/semaphores_manuel_exemples/exercice_rw/Makefile b/c/semaphores_manuel_exemples/exercice_rw/Makefile
similarity index 100%
rename from C_Language/semaphores_manuel_exemples/exercice_rw/Makefile
rename to c/semaphores_manuel_exemples/exercice_rw/Makefile
diff --git a/C_Language/semaphores_manuel_exemples/exercice_rw/consommateur.c b/c/semaphores_manuel_exemples/exercice_rw/consommateur.c
similarity index 100%
rename from C_Language/semaphores_manuel_exemples/exercice_rw/consommateur.c
rename to c/semaphores_manuel_exemples/exercice_rw/consommateur.c
diff --git a/C_Language/semaphores_manuel_exemples/exercice_rw/consommateur.h b/c/semaphores_manuel_exemples/exercice_rw/consommateur.h
similarity index 100%
rename from C_Language/semaphores_manuel_exemples/exercice_rw/consommateur.h
rename to c/semaphores_manuel_exemples/exercice_rw/consommateur.h
diff --git a/C_Language/semaphores_manuel_exemples/exercice_rw/constantes.h b/c/semaphores_manuel_exemples/exercice_rw/constantes.h
similarity index 100%
rename from C_Language/semaphores_manuel_exemples/exercice_rw/constantes.h
rename to c/semaphores_manuel_exemples/exercice_rw/constantes.h
diff --git a/C_Language/semaphores_manuel_exemples/exercice_rw/global.c b/c/semaphores_manuel_exemples/exercice_rw/global.c
similarity index 100%
rename from C_Language/semaphores_manuel_exemples/exercice_rw/global.c
rename to c/semaphores_manuel_exemples/exercice_rw/global.c
diff --git a/C_Language/semaphores_manuel_exemples/exercice_rw/producteur.c b/c/semaphores_manuel_exemples/exercice_rw/producteur.c
similarity index 100%
rename from C_Language/semaphores_manuel_exemples/exercice_rw/producteur.c
rename to c/semaphores_manuel_exemples/exercice_rw/producteur.c
diff --git a/C_Language/semaphores_manuel_exemples/exercice_rw/producteur.h b/c/semaphores_manuel_exemples/exercice_rw/producteur.h
similarity index 100%
rename from C_Language/semaphores_manuel_exemples/exercice_rw/producteur.h
rename to c/semaphores_manuel_exemples/exercice_rw/producteur.h
diff --git a/C_Language/semaphores_manuel_exemples/exercice_rw/rapport b/c/semaphores_manuel_exemples/exercice_rw/rapport
similarity index 100%
rename from C_Language/semaphores_manuel_exemples/exercice_rw/rapport
rename to c/semaphores_manuel_exemples/exercice_rw/rapport
diff --git a/C_Language/semaphores_manuel_exemples/exercice_rw/sema.c b/c/semaphores_manuel_exemples/exercice_rw/sema.c
similarity index 100%
rename from C_Language/semaphores_manuel_exemples/exercice_rw/sema.c
rename to c/semaphores_manuel_exemples/exercice_rw/sema.c
diff --git a/C_Language/semaphores_manuel_exemples/exercice_rw/sema.h b/c/semaphores_manuel_exemples/exercice_rw/sema.h
similarity index 100%
rename from C_Language/semaphores_manuel_exemples/exercice_rw/sema.h
rename to c/semaphores_manuel_exemples/exercice_rw/sema.h
diff --git a/C_Language/semaphores_manuel_exemples/exercice_rw/types.h b/c/semaphores_manuel_exemples/exercice_rw/types.h
similarity index 100%
rename from C_Language/semaphores_manuel_exemples/exercice_rw/types.h
rename to c/semaphores_manuel_exemples/exercice_rw/types.h
diff --git a/C_Language/semaphores_manuel_exemples/ipc_shm_posix.c b/c/semaphores_manuel_exemples/ipc_shm_posix.c
similarity index 100%
rename from C_Language/semaphores_manuel_exemples/ipc_shm_posix.c
rename to c/semaphores_manuel_exemples/ipc_shm_posix.c
diff --git a/C_Language/semaphores_manuel_exemples/manuel_2009.pdf b/c/semaphores_manuel_exemples/manuel_2009.pdf
similarity index 100%
rename from C_Language/semaphores_manuel_exemples/manuel_2009.pdf
rename to c/semaphores_manuel_exemples/manuel_2009.pdf
diff --git a/C_Language/semaphores_manuel_exemples/wtest6.c.pdf b/c/semaphores_manuel_exemples/wtest6.c.pdf
similarity index 100%
rename from C_Language/semaphores_manuel_exemples/wtest6.c.pdf
rename to c/semaphores_manuel_exemples/wtest6.c.pdf
diff --git a/C_Language/skel_getopts.c b/c/skel_getopts.c
similarity index 100%
rename from C_Language/skel_getopts.c
rename to c/skel_getopts.c
diff --git a/C_Language/squeeze.c b/c/squeeze.c
similarity index 100%
rename from C_Language/squeeze.c
rename to c/squeeze.c
diff --git a/C_Language/strdup.c b/c/strdup.c
similarity index 100%
rename from C_Language/strdup.c
rename to c/strdup.c
diff --git a/C_Language/strdup2.c b/c/strdup2.c
similarity index 100%
rename from C_Language/strdup2.c
rename to c/strdup2.c
diff --git a/C_Language/swapp.c b/c/swapp.c
similarity index 100%
rename from C_Language/swapp.c
rename to c/swapp.c
diff --git a/C_Language/testargs.c b/c/testargs.c
similarity index 100%
rename from C_Language/testargs.c
rename to c/testargs.c
diff --git a/C_Language/voir.c b/c/voir.c
similarity index 100%
rename from C_Language/voir.c
rename to c/voir.c
diff --git a/C_Language/weechat_plugins/Makefile b/c/weechat_plugins/Makefile
similarity index 100%
rename from C_Language/weechat_plugins/Makefile
rename to c/weechat_plugins/Makefile
diff --git a/C_Language/weechat_plugins/currentsong.c b/c/weechat_plugins/currentsong.c
similarity index 100%
rename from C_Language/weechat_plugins/currentsong.c
rename to c/weechat_plugins/currentsong.c
diff --git a/C_Language/weechat_plugins/weechat-plugins.h b/c/weechat_plugins/weechat-plugins.h
similarity index 100%
rename from C_Language/weechat_plugins/weechat-plugins.h
rename to c/weechat_plugins/weechat-plugins.h
diff --git a/C_Language/wordcount.c b/c/wordcount.c
similarity index 100%
rename from C_Language/wordcount.c
rename to c/wordcount.c
diff --git a/PERL_Language/chrono.pl b/perl/chrono.pl
similarity index 100%
rename from PERL_Language/chrono.pl
rename to perl/chrono.pl
diff --git a/PERL_Language/daemon.pl b/perl/daemon.pl
similarity index 100%
rename from PERL_Language/daemon.pl
rename to perl/daemon.pl
diff --git a/PERL_Language/enMajuscule.pl b/perl/enMajuscule.pl
similarity index 100%
rename from PERL_Language/enMajuscule.pl
rename to perl/enMajuscule.pl
diff --git a/PERL_Language/eratosthene.pl b/perl/eratosthene.pl
similarity index 100%
rename from PERL_Language/eratosthene.pl
rename to perl/eratosthene.pl
diff --git a/PERL_Language/getpwent.pl b/perl/getpwent.pl
similarity index 100%
rename from PERL_Language/getpwent.pl
rename to perl/getpwent.pl
diff --git a/PERL_Language/getpwent2.pl b/perl/getpwent2.pl
similarity index 100%
rename from PERL_Language/getpwent2.pl
rename to perl/getpwent2.pl
diff --git a/PERL_Language/humanornot.pl b/perl/humanornot.pl
similarity index 100%
rename from PERL_Language/humanornot.pl
rename to perl/humanornot.pl
diff --git a/PERL_Language/humanornot2.pl b/perl/humanornot2.pl
similarity index 100%
rename from PERL_Language/humanornot2.pl
rename to perl/humanornot2.pl
diff --git a/PERL_Language/lePlusGros.pl b/perl/lePlusGros.pl
similarity index 100%
rename from PERL_Language/lePlusGros.pl
rename to perl/lePlusGros.pl
diff --git a/PERL_Language/max.pl b/perl/max.pl
similarity index 100%
rename from PERL_Language/max.pl
rename to perl/max.pl
diff --git a/PERL_Language/maxcourt.pl b/perl/maxcourt.pl
similarity index 100%
rename from PERL_Language/maxcourt.pl
rename to perl/maxcourt.pl
diff --git a/PERL_Language/mirroir.pl b/perl/mirroir.pl
similarity index 100%
rename from PERL_Language/mirroir.pl
rename to perl/mirroir.pl
diff --git a/PERL_Language/multi_chrono.pl b/perl/multi_chrono.pl
similarity index 100%
rename from PERL_Language/multi_chrono.pl
rename to perl/multi_chrono.pl
diff --git a/PERL_Language/nbmots.pl b/perl/nbmots.pl
similarity index 100%
rename from PERL_Language/nbmots.pl
rename to perl/nbmots.pl
diff --git a/PERL_Language/rappels.pl b/perl/rappels.pl
similarity index 100%
rename from PERL_Language/rappels.pl
rename to perl/rappels.pl
diff --git a/PERL_Language/silent_cmp.pl b/perl/silent_cmp.pl
similarity index 100%
rename from PERL_Language/silent_cmp.pl
rename to perl/silent_cmp.pl
diff --git a/PERL_Language/tube.pl b/perl/tube.pl
similarity index 100%
rename from PERL_Language/tube.pl
rename to perl/tube.pl
diff --git a/perl/wc.pl b/perl/wc.pl
new file mode 100755
index 0000000..ac647ff
--- /dev/null
+++ b/perl/wc.pl
@@ -0,0 +1,12 @@
+#!/usr/bin/perl -w
+
+# Utilisation : wc.pl fichier
+
+open(F, "<$ARGV[0]") || die "Problème d'ouverture de fichier ! ";
+
+$i = 0 ;
+$i++ while(