Re: ps command differs in ksh and bash



On 27 Sep 2006 05:08:10 -0700, Salvatore
<salvatore.didio@xxxxxxxxxx> wrote:
Hello,

Can someone explain me why in bash the following command returns s
value while not in ksh.

In bash

[webadmin@pomme webadmin]$ ps -ef | grep jakarta-tomcat-5.0.28_rec |
grep -v grep

tomcat 17501 1 0 12:42 pts/2 00:00:34
/usr/local/java/bin/java -server -Xms128m -Xmx512m
-Djava.endorsed.dirs=/usr/local/jakarta-tomcat-5.0.28_rec/common/endorsed
-classpath
/usr/local/java/lib/tools.jar:/usr/local/jakarta-tomcat-5.0.28_rec/bin/bootstrap.jar:/usr/local/jakarta-tomcat-5.0.28_rec/bin/commons-lo
[webadmin@pomme webadmin]$ ksh

In ksh

$ ps -ef | grep jakarta-tomcat-5.0.28_rec | grep -v grep
$

It seems as if ksh could not handle long string !!!

Are you certain you typed exactly the same string, and that
jakarta-tomcat was running both times? It looks as if your ps in bash
is aliased with the "show all parameters" option. Is there a different
alias under ksh?


--
People who think they know everything greatly annoy those of us who do.
.



Relevant Pages

  • Re: vi horizontal split screen
    ... I'm an old ksh hacker, but bash will do fine. ... I started on the SysV R2 Bourne shell, and used csh for a better ... Several ksh improvements were designed to make it faster and more efficient at processing scripts, and one way to do that was substitute built-ins for external commands called from the script. ...
    (comp.editors)
  • FAST, but full feature ksh.
    ... built ksh vs a statically built bash, I found that the ksh was ... sluggish bash to the POSSIBLY quicker ksh... ... case of molasses, try playing with shell scripting on cygwin, ... but today my measurement now isn't done ...
    (comp.unix.bsd.freebsd.misc)
  • Re: FAST, but full feature ksh.
    ... > built ksh vs a statically built bash, I found that the ksh was about ... > sluggish bash to the POSSIBLY quicker ksh... ... > molasses, try playing with shell scripting on cygwin, but I don't ...
    (comp.unix.bsd.freebsd.misc)
  • Re: Set -o Vi Causes core dump and segmentation fault
    ... set -o vi command and nothing happened. ... different from the parent shell's editor it causes this segmentation ... Our parent shell is bash and the editor is set (by /etc/ ... If you then spawn a ksh subshell,run set -o vi, ...
    (linux.redhat)
  • Re: Syntax question - bash vs ksh
    ... Works fine in ksh. ... Reading the man page for bash has not enlightened me. ... syntax differs from the ksh syntax to perform the same function. ... good websites with shell comparisons and good examples, ...
    (comp.unix.shell)