Results 1 to 3 of 3
Hi,
I'm writing a bash script which is designed to monitor WebSphere Queues.
I've got it working in principle. However dependent on the length of text the queue name is, ...
- 11-07-2010 #1Just Joined!
- Join Date
- Aug 2010
- Posts
- 4
[SOLVED] Data output format issue awk or cut?
Hi,
I'm writing a bash script which is designed to monitor WebSphere Queues.
I've got it working in principle. However dependent on the length of text the queue name is, I get varied output which has become an issue because the "cut" and "awk" rule varies for different queue outputs.
EG on the two lines of output I'm getting:
que_dep= TYPE(QUEUE) CURDEPTH(0)
que_dep= CURDEPTH(0) IPPROCS(0)
Can anyone suggest how I can possibly "cut" or "awk" the "CURDEPTH(0)" value ONLY from these lines?
Thanks
- 11-07-2010 #2
egrep might help
Adjust the regex to the possible values of curdepthCode:egrep -o "CURDEPTH\([0-9]{1,1}\)" logfileYou must always face the curtain with a bow.
- 11-07-2010 #3Just Joined!
- Join Date
- Aug 2010
- Posts
- 4
Thanks! That works well.


