ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General Discussion » Any one good in shell scripting:)

Post new topic  Reply to topic
 Any one good in shell scripting:) « View previous topic :: View next topic » 
Author Message
mvarghese
PostPosted: Fri Jun 22, 2007 3:06 pm    Post subject: Any one good in shell scripting:) Reply with quote

Centurion

Joined: 27 Sep 2006
Posts: 141

echo "dis QS(*)" |runmqsc QMGRname | grep -v "AMQ" |awk '{print $1}'

Now o/p :Queue(QL.xyz)
CURDEPTH(3)

I need an o/p looks like Queue(QL.xyz) CURDEPTH(3)

Basically Queue & Curdepth in a single line with out any big looping logic.
Is that possible.

Thanks in advance
_________________
Jain Varghese
Back to top
View user's profile Send private message
Michael Dag
PostPosted: Fri Jun 22, 2007 11:18 pm    Post subject: Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

or you could use MO72 (MQSC Client) it has more options to put stuff on oneline and more...
_________________
Michael



MQSystems Facebook page
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
wschutz
PostPosted: Sat Jun 23, 2007 3:28 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

How's this:

Code:
echo "dis Qs(*)" |  runmqsc  | sed -ne 's/\(.*\)TYPE(QUEUE)\(.*\)/\1 \2/;/QUEUE/,/CURDEPTH/p' |xargs -n 2
QUEUE(A/B) CURDEPTH(4)
QUEUE(CEP.SXSHOW.3) CURDEPTH(12)
QUEUE(SYSTEM.ADMIN.ACCOUNTING.QUEUE) CURDEPTH(0)
QUEUE(SYSTEM.ADMIN.ACTIVITY.QUEUE) CURDEPTH(0)
...


or maybe :
Code:
 echo "dis Qs(*)" |  runmqsc  | sed -ne 's/\(.*\)TYPE(QUEUE)\(.*\)/\1 \2/;/QUEUE/,/CURDEPTH/p' |xargs -n 2 | grep -v "CURDEPTH(0)"

_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
mvarghese
PostPosted: Sat Jun 30, 2007 1:33 pm    Post subject: Reply with quote

Centurion

Joined: 27 Sep 2006
Posts: 141

Thanks every one.
_________________
Jain Varghese
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General Discussion » Any one good in shell scripting:)
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.