Bug 709774 - ksh handling variable assignment with the use of multiple pipes and different variable assignment mechanisms
Summary: ksh handling variable assignment with the use of multiple pipes and different...
Keywords:
Status: CLOSED DUPLICATE of bug 736195
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: ksh
Version: 5.5
Hardware: All
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Michal Hlavinka
QA Contact: qe-baseos-tools
URL:
Whiteboard:
Depends On:
Blocks: 736056
TreeView+ depends on / blocked
 
Reported: 2011-06-01 15:29 UTC by Dave Sullivan
Modified: 2011-10-25 12:24 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 736056 (view as bug list)
Environment:
Last Closed: 2011-10-25 12:24:29 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0159 normal SHIPPED_LIVE ksh bug fix and enhancement update 2012-02-20 14:53:47 UTC

Description Dave Sullivan 2011-06-01 15:29:27 UTC
Description of problem:

In consistency on how ksh performs the following.

#1
IsRunning=`ps -ef |grep /home/elcaro/scripts/cron/spool_purge_co_appl_log | grep -v grep| grep -v eflex | wc -l`

#2
IsRunning=$(ps -ef |grep /home/elcaro/scripts/cron/spool_purge_co_appl_log | grep -v grep| grep -v eflex | wc -l)

ps -ef |grep /home/elcaro/scripts/cron/spool_purge_co_appl_log | grep -v grep| grep -v eflex | wc -l | read IsRunning

The #1 backtic way seems like obsoleted way of doing it. The #2 way should work.  And the #3 way works.

Version-Release number of selected component (if applicable):

RHEL5.1/ksh-20060214-1.4:       1/1  (works)
RHEL5.2/ksh-20060214-1.7:       1/1  (works)
RHEL5.3/ksh-20080202-2.el5:     1/1  (works)
RHEL5.4/ksh-20080202-14.el5:    1/1  (works)

RHEL5.5/ksh-20100202-1.el5:     1/2  (doesn't work)
RHEL5.6/ksh-20100202-1.el5_6.3: 1/2  (doesn't work)
RHEL6.0/ksh-20100621-6.el6:     1/2  (doesn't work)


How reproducible:


Steps to Reproduce:
1. Write a simple script similar to above using say top instead
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 5 Michal Hlavinka 2011-10-25 12:24:29 UTC

*** This bug has been marked as a duplicate of bug 736195 ***


Note You need to log in before you can comment on or make changes to this bug.