RECHERCHER :
COMMUNAUTE MP
Identifiez vous ...
Devenir Membre
J'ai oublié mon MDP
DOMAINE MP
Bavardages
Langages Généraux
Langages Web
Langages DotNet
Autres langages
Dev. Jeux Video
Sécurité
Sys. Exploitation
Graphismes
Logiciels
Réseaux
Bases de données
Méthodologies
Emplois High-tech
Aide juridique
Articles juridiques
FORUM
Index des forums
Ajouter un sujet
Rechercher sujet
Contact Responsable
Devenir modérateur
CHAT MP IRC
Votre pseudo ...
Srv: irc.moteurprog.com
Chan: #MoteurProg
PARTICIPER
Plus de 3500 emplois.
Rechercher un job
Déposez votre CV
Emplois High-tech

Visiteur MP

 la commande shell "m4"

Forum : LINUX
Sous Catégorie : Aucune
Type du sujet : Sujet Normale
FAQ : FAQ LINUX

SUIVI DES SUJETS PAR MAIL

SUIVI PAR MAIL INACTIF

RESOLUTION DU SUJET SUJET NON RESOLU
BLOQUAGE DU SUJET SUJET ACTIF
APPARTENANCE A LA FAQ N'APPARTIENT PAS A LA FAQ


PAGES : [1] [2]

POSTER UN NOUVEAU SUJET REPONDRE A CE SUJET

FORUM LINUX

PREMIERE PAGE

PAGE PRECEDENTE

Page précedente

Page suivante

PAGE SUIVANTE

DERNIERE PAGE
chercheur
Nouveau membre
Inscrit : 08/02/2009
Messages : 18
Message
#160586
Posté le 10/02/09 à 19:35
bonsoir à tous,
s'ils vous, y a t-il quelqu'un parmi vous qui connait ce que fait exactement cette commande shell en general et dans ce cas:

echo "substr($string,4)"|m4
echo "regexp($string, [O-1][0-1],&Z)"|m4

merci infiniment
bonne soirée

HAUT DE PAGE

PROFIL MEMBRE LUI ECRIRE 

Publicité
Inscrit : X
Messages : X
Message
#Aucun

HAUT DE PAGE

  

Czayfaboo
Co-Administrateur
Superviseur :
- Langages Dot.
Modérateur :
- CSharp (C#)
Chef de projet(s) :
- ID3.NET Library
- MoteurProg Work.

Avatar de Czayfaboo
Inscrit : 05/01/2005
Messages : 3142
Message
#160598
Posté le 11/02/09 à 16:34
Salut !

C'est quoi comme shell ?

Juste en lisant ton code, je te dis :
  • substr($string,4) prend la chaine de caractères $string et la découpe pour qu'elle commence au 4ième caractères.
  • Le echo permet d'afficher le résultat.
  • regexp($string, [O-1][0-1],&Z) cherche dans $string toutes les occurences de chaînes faisant deux caractères et dont le premier caractère est obligatoirement un caractère ASCII compris entre la lettre O et 1 (voir les tables ASCII) et dont le deuxime caractère est nécessairement un 0 ou un 1 et stocke le(s) résultat(s) dans Z.


Ton expression régulière est bizarre tout de même, y'a des trucs inutiles ou qui n'ont pas beaucoup de sens (notamment le [O-1] vu que la valeur de 'O' est supérieure à celle de '1').

Par contre, je sais pas ce que sais que ce |m4... T'aurais pas une fonction qui s'appelle m4 par hasard ?
__________________________
Mon Portfolio : http://www.fabienrenaud.com
Vacances Scolaires : http://fr.dates-vacances-scolaires.com

HAUT DE PAGE

PROFIL MEMBRE LUI ECRIRE 

Coolboy
Administrateur
Superviseur :
- PHP
- MySQL
- Oracle
- Ajax
- Sécurité
- Linux
Chef de projet(s) :
- Moteurprog 2010

Avatar de Coolboy
Inscrit : 25/06/2004
Messages : 1348
Message
#160599
Posté le 11/02/09 à 16:46
m4 est executé après chacunes des deux commandes, pour voir ce que c'est, essaye de trouver l'executable dans les paths habituels, du genre /usr/bin, /bin, /sbin, etc...
Une fois trouvé essaye de faire un ./m4 --help , avec un peu de chance y'aura une aide et tu sauras de quoi il s'agit :)
__________________________
Administrateur Moteurprog.com

HAUT DE PAGE

PROFIL MEMBRE LUI ECRIRE 

Czayfaboo
Co-Administrateur
Superviseur :
- Langages Dot.
Modérateur :
- CSharp (C#)
Chef de projet(s) :
- ID3.NET Library
- MoteurProg Work.

Avatar de Czayfaboo
Inscrit : 05/01/2005
Messages : 3142
Message
#160602
Posté le 11/02/09 à 16:58
man m4 dit :
M4(1) User Commands M4(1)



NAME
m4 - macro processor

SYNOPSIS
m4 [OPTION]... [FILE]...

DESCRIPTION
Process macros in FILEs. If no FILE or if FILE is ‘-’, standard input
is read.

Mandatory or optional arguments to long options are mandatory or
optional for short options too.

Operation modes:
--help display this help and exit

--version
output version information and exit

-E, --fatal-warnings
once: warnings become errors, twice: stop execution at first
error

-i, --interactive
unbuffer output, ignore interrupts

-P, --prefix-builtins
force a ‘m4_’ prefix to all builtins

-Q, --quiet, --silent
suppress some warnings for builtins

--warn-macro-sequence[]
warn if macro definition matches REGEXP, default
$({[^}]*}|[0-9][0-9]+)

-W, --word-regexp=REGEXP
use REGEXP for macro name syntax

Preprocessor features:
-D, --define=NAME[]
define NAME as having VALUE, or empty

-I, --include=DIRECTORY
append DIRECTORY to include path

-s, --synclines
generate ‘#line NUM "FILE"’ lines

-U, --undefine=NAME
undefine NAME

Limits control:
-G, --traditional
suppress all GNU extensions

-H, --hashsize=PRIME
set symbol lookup hash table size [509]

-L, --nesting-limit=NUMBER
change artificial nesting limit [1024]

Frozen state files:
-F, --freeze-state=FILE
produce a frozen state on FILE at end

-R, --reload-state=FILE
reload a frozen state from FILE at start

Debugging:
-d, --debug[]
set debug level (no FLAGS implies ‘aeq’)

--debugfile=FILE
redirect debug and trace output

-l, --arglength=NUM
restrict macro tracing size

-t, --trace=NAME
trace NAME when it is defined

FLAGS is any of:
a show actual arguments

c show before collect, after collect and after call

e show expansion

f say current input file name

i show changes in input files

l say current input line number

p show results of path searches

q quote values as necessary, with a or e flag

t trace for all macro calls, not only traceon’ed

x add a unique macro call id, useful with c flag

V shorthand for all of the above flags

If defined, the environment variable ‘M4PATH’ is a colon-separated list
of directories included after any specified by ‘-I’.

Exit status is 0 for success, 1 for failure, 63 for frozen file version
mismatch, or whatever value was passed to the m4exit macro.

AUTHOR
Written by Rene’ Seindal.

REPORTING BUGS
Report bugs to <bug-m4@gnu.org>.

COPYRIGHT
Copyright © 2008 Free Software Foundation, Inc. License GPLv3+: GNU
GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

SEE ALSO
The full documentation for m4 is maintained as a Texinfo manual. If
the info and m4 programs are properly installed at your site, the com&#8208;
mand

info m4

should give you access to the complete manual.



GNU M4 1.4.11 April 2008 M4(1)

__________________________
Mon Portfolio : http://www.fabienrenaud.com
Vacances Scolaires : http://fr.dates-vacances-scolaires.com

HAUT DE PAGE

PROFIL MEMBRE LUI ECRIRE 

Coolboy
Administrateur
Superviseur :
- PHP
- MySQL
- Oracle
- Ajax
- Sécurité
- Linux
Chef de projet(s) :
- Moteurprog 2010

Avatar de Coolboy
Inscrit : 25/06/2004
Messages : 1348
Message
#160603
Posté le 11/02/09 à 17:40
Et ben voila, executeur de macro :)

Pour ma part il est situé dans /usr/bin/m4 sur le serveur hébergeant Moteurprog, et en faisant un simple "locate m4", on constate qu'il y a bien souvent des fichiers en .m4 dans les différentes applications (sendmail, UnrealIrcd) etc...

Déplacé dans la bonne section au passage.
__________________________
Administrateur Moteurprog.com

HAUT DE PAGE

PROFIL MEMBRE LUI ECRIRE 

pistache
Superviseur :
- CSharp (C#)
Modérateur :
- VB .NET
- XAML
Chef de projet(s) :
- Image Data base
- Titan

Avatar de pistache
Inscrit : 22/02/2005
Messages : 1310
Message
#167166
Posté le 28/11/09 à 14:09
Czayfaboo: rtfm \o/
__________________________
Image
La quadrature du net

HAUT DE PAGE

PROFIL MEMBRE LUI ECRIRE 

Czayfaboo
Co-Administrateur
Superviseur :
- Langages Dot.
Modérateur :
- CSharp (C#)
Chef de projet(s) :
- ID3.NET Library
- MoteurProg Work.

Avatar de Czayfaboo
Inscrit : 05/01/2005
Messages : 3142
Message
#167167
Posté le 28/11/09 à 15:35
Smiley
__________________________
Mon Portfolio : http://www.fabienrenaud.com
Vacances Scolaires : http://fr.dates-vacances-scolaires.com

HAUT DE PAGE

PROFIL MEMBRE LUI ECRIRE 

rainbow
Superviseur :
- C & C++
Chef de projet(s) :
- IA savane
- Team MoteurProg

Avatar de rainbow
Inscrit : 26/05/2006
Messages : 1476
Message
#167168
Posté le 28/11/09 à 16:23
rtfm = read the fucking manuel
__________________________
............ Curtis: RTS 3D ..............
......Image
........... TeamMoteurProg...........

How to ask Questions ou Comment poser une question
TPE Rayons X et Scoliose

HAUT DE PAGE

PROFIL MEMBRE LUI ECRIRE ALLER VOIR SON SITE

pistache
Superviseur :
- CSharp (C#)
Modérateur :
- VB .NET
- XAML
Chef de projet(s) :
- Image Data base
- Titan

Avatar de pistache
Inscrit : 22/02/2005
Messages : 1310
Message
#167169
Posté le 28/11/09 à 16:42
juste pour dire que le rtfm c'est le bien Smiley
__________________________
Image
La quadrature du net

HAUT DE PAGE

PROFIL MEMBRE LUI ECRIRE 

Czayfaboo
Co-Administrateur
Superviseur :
- Langages Dot.
Modérateur :
- CSharp (C#)
Chef de projet(s) :
- ID3.NET Library
- MoteurProg Work.

Avatar de Czayfaboo
Inscrit : 05/01/2005
Messages : 3142
Message
#167170
Posté le 28/11/09 à 18:13
Mais tu me dis à moi de le lire dans ton message... C'est ça que je comprends pas...
__________________________
Mon Portfolio : http://www.fabienrenaud.com
Vacances Scolaires : http://fr.dates-vacances-scolaires.com

HAUT DE PAGE

PROFIL MEMBRE LUI ECRIRE 
POSTER UN NOUVEAU SUJET REPONDRE A CE SUJET

PREMIERE PAGE

PAGE PRECEDENTE Page précédente

Page suivante

PAGE SUIVANTE DERNIERE PAGE

FORUM LINUX



    PAGES : [1] [2]



.: Site Web développé par Yann Pingot et l'équipe MPWG avec www.evolvia-web.com :.