OVH Cloud OVH Cloud

pour me coucher moins c... idiot

4 réponses
Avatar
bertrand
bonjour,

je suis peut etre hs mais pourquoi :

[root@hermione bertrand]# ps a | grep bash
2243 vc/1 S 0:00 -bash
2350 pts/0 S 0:00 bash
7411 pts/1 S 0:00 bash
7447 pts/1 S 0:00 bash
7753 pts/1 R 0:00 bash
[root@hermione bertrand]# ps -a | grep bash
7447 pts/1 00:00:00 bash
7755 pts/1 00:00:00 bash
[root@hermione bertrand]# ps x | grep bash
7447 pts/1 R 0:00 bash
7759 pts/1 R 0:00 bash
[root@hermione bertrand]# ps -x | grep bash
Bad syntax, perhaps a bogus '-'?
7447 pts/1 S 0:00 bash
7761 pts/1 R 0:00 bash

alors que :

[root@hermione bertrand]# man ps
...
ps [-] [lujsvmaxScewhrnu] [txx] [O[+|-]k1[[+|-]k2...]] [pids]
...

c'est le 'Bad syntax, perhaps a bogus '-'?' qui me gene.

voila, voila...

bertrand

4 réponses

Avatar
JKB
Le 25-11-2003, à propos de
pour me coucher moins c... idiot,
bertrand écrivait dans fr.comp.os.linux.configuration :
bonjour,

je suis peut etre hs mais pourquoi :


man ps [il faut de temps en temps RTMFer !]. Je lis au début :

COMMAND-LINE OPTIONS
This version of ps accepts several kinds of options.

Unix options may be grouped and must be preceeded by a
dash. BSD options may be grouped and must not be used with a
dash. Gnu long options are preceeded by two dashes.

JKB

Avatar
bertrand
Le Tue, 25 Nov 2003 10:17:00 +0000, JKB disait :



man ps [il faut de temps en temps RTMFer !]. Je lis au début :


COMMAND-LINE OPTIONS
This version of ps accepts several kinds of options.

Unix options may be grouped and must be preceeded by a
dash. BSD options may be grouped and must not be used with a
dash. Gnu long options are preceeded by two dashes.



j'avais RTFMer (mais pas RTMFer) mais je suis surement tres ..idiot, et/ou
j'ai mal formule ma question.

d'ou _question_ :

pourquoi 2 comportements differents avec l'option a et x quand on pipe vers
grep? (ie bogus ou pas bogus)

le reponse n'est pas : unix [bsd ou gnu] n'accepte ou n'accepte pas de
dash...enfin c'est ce que je crois.

bertrand

Avatar
g.patel
On Tue, 25 Nov 2003 10:33:10 +0100, "bertrand"
wrote:

[ bertrand]# ps -x | grep bash
Bad syntax, perhaps a bogus '-'?


[ gerard]$ ps -ax | grep bash
Warning: bad syntax, perhaps a bogus '-'? See
http://procps.sf.net/faq.html

Gerard

Avatar
bertrand
Le Tue, 25 Nov 2003 12:23:02 +0000, gerard patel disait :

On Tue, 25 Nov 2003 10:33:10 +0100, "bertrand"
wrote:

[ bertrand]# ps -x | grep bash
Bad syntax, perhaps a bogus '-'?


[ gerard]$ ps -ax | grep bash
Warning: bad syntax, perhaps a bogus '-'? See
http://procps.sf.net/faq.html

Gerard
merci,

c'est fort unix, ça anticipe meme mes erreurs!

je doit paraitre parano, mais la derniere fois que j'ai vue un
comportement bizarre dans ce genre de programme, ça c'est avere etre un
rootkit!

j'avais cherche 'erreur ps bogus' dans google sans resultat...faut que je
me mette serieusement à l'anglais.

encore merci,

bertrand