AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
#Power
 View Only
  • 1.  Grep Problem

    Posted Sun February 26, 2006 08:41 PM

    Originally posted by: SystemAdmin


    I have a problem on using grep with MQ commands

    below is the script statment:
    set -A arr2 `echo "dis qstatus(*) $2" | runmqsc <qmgr> | grep <attribute> | grep -v "dis qstatus" | sed -n 's/.*(\(.*\)).*/\1/p'`

    I want to store particular queue attribute of all queues to an array arr2. But if using above script without [i]grep -v "dis qstatus"[/i], the subdirectories and files of my current working directory will occupy the top elements of arr2, with the queue attributes that i want stored behind them.

    Any comments?
    #AIX-Forum