Sponsored Content
Full Discussion: Issue with null value
Top Forums Shell Programming and Scripting Issue with null value Post 302656645 by Peasant on Friday 15th of June 2012 06:27:10 AM
Old 06-15-2012
Try using awk and shell in this formulation when working with IBM MQ cli.

For instance, for XMITQ variable :

Code:
QUEUE=YOURQUEUE
QMGR=YOURQUEUEMANAGER
XMITQ=$(
(
runmqsc -e $QMGR <<EOF
dis qr($QUEUE) xmitq
EOF
) | awk '/XMITQ/{ print (match($0,/\([^ ].*\)/)) ? substr($0,RSTART+1,RLENGTH-2) : "NULL" } '
)
echo $XMITQ

This will return NULL string (or if you wish something else) if the XMITQ is non existant or set value to XMITQ if the output contains it.

Hope that helps.
Regards
Peasant.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Has anyone seen this issue with the /dev/null?

hello all, I am working in a Hpux 11.0 64 bit environment. I am not sure if a third party software is doing this or not, but the admin to this server says it is not a server issue as he has check and double check logs and crons to verify this issue. My problem, is that every now and then, once... (4 Replies)
Discussion started by: oott
4 Replies

2. UNIX for Advanced & Expert Users

Null Value

Hello All, I have a file of the format **** 123 abc ABC 456 bcd BCD 789 def 112 ghi GHI 223 jkl 344 mno MNO **** I am trying to extract the lines that have no values in the third field (in this case, this would be 789 def 223 jkl Can anyone please help??... (1 Reply)
Discussion started by: Khoomfire
1 Replies

3. Shell Programming and Scripting

Varibale to NULL or ZERO

I have a variable called V_param1 and does it have some value. I want to check this varibale is NULL or Zero then exit else do How to incorported this in Script. any input (2 Replies)
Discussion started by: u263066
2 Replies

4. IP Networking

Could a tcp issue be causing a null pointer exception?

The client's app gets a 'suspend error' which they say is due to a null pointer exception. Application people say nothing's wrong with the app. Network people say the network's fine. I'm supposed to see what's wrong with the system to be causing this error. I checked the NIC card settings, which... (1 Reply)
Discussion started by: pmichner
1 Replies

5. Shell Programming and Scripting

compare null with non-null

I've got a very peculiar situation. I'm trying to find out if we can compare null fields with non-null. I've output csv files from SQL and Oracle. I need to compare each field from the files, and then find out any differences. The files usualy have over 500 fields, and send the resule to DBA.... (8 Replies)
Discussion started by: nitin
8 Replies

6. Shell Programming and Scripting

Insert string 'NULL' where there is a null value

I have an input file having 7 fields delimited by , eg : 1,ABC,hg,1,2,34,3 2,hj,YU,2,3,4, 3,JU,kl,4,5,7, 4,JK,KJ,3,56,4,5 The seventh field here in some lines is empty, whereas the other lines there is a value. How do I insert string NULL at this location (7th loc) for these lines where... (8 Replies)
Discussion started by: zilch
8 Replies

7. UNIX for Dummies Questions & Answers

/dev/null 2>&1 Versus /dev/null 2>1

How are these two different? They both prevent output and error from being displayed. I don't see the use of the "&" echo "hello" > /dev/null 2>&1 echo "hello" > /dev/null 2>1 (3 Replies)
Discussion started by: glev2005
3 Replies

8. Shell Programming and Scripting

Redirecting standard out to /dev/null goes to file "/dev/null" instead

I apologize if this question has been answered else where or is too elementary. I ran across a KSH script (long unimportant story) that does this: if ; then CAS_SRC_LOG="/var/log/cas_src.log 2>&1" else CAS_SRC_LOG="/dev/null 2>&1" fithen does this: /usr/bin/echo "heartbeat:... (5 Replies)
Discussion started by: jbmorrisonjr
5 Replies

9. AIX

/dev/null file issue

Hi Experts, I Have a query. In one of my server I just came to know that there was /dev/null file which is a not a character file. Its just a normal file. I know the command to create the character file (/dev/null) but what is the procedure. Like should i delete /dev/null and create or... (7 Replies)
Discussion started by: jayadeava
7 Replies

10. Linux

Issue in inserting null string in array

I am getting some values from a file and putting them in an array..but the null strings are not getting passed to the array. So during printing the elements ,the null string is not showing in the output. during array size calculation it is also excluding null.Please let me know how to do it. # cat... (2 Replies)
Discussion started by: millan
2 Replies
MUMBLE-SERVER-CLI(1)						   User Commands					      MUMBLE-SERVER-CLI(1)

NAME
mumble-server-cli - allows calling methods of mumble-server from the shell SYNOPSIS
mumble-server-cli [options] [<method name>] [<method arguments>] DESCRIPTION
Each method argument has the form: [<data type: bool|int|float|string>:]value If you do not specify a data type, string will be assumed, otherwise `value' will be converted to the given type first. The bool conversion interprets each of 'True', 'true', '1', 'Yes', 'yes' as True, everything else as False. Example: int:4 float:3.5 string:oh:hai foobar bool:yes OPTIONS
-h, --help show this help message and exit -d DJANGO_SETTINGS, --django-settings=DJANGO_SETTINGS if specified, get connstring and slice defaults from the given Django settings module. Default: empty. -c CONNSTRING, --connstring=CONNSTRING connection string to use. Default is 'Meta:tcp -h 127.0.0.1 -p 6502'. -s SLICE, --slice=SLICE path to the slice file. Default is '/usr/share/slice/Murmur.ice'. -e ENCODING, --encoding=ENCODING Character set arguments are encoded in. Default: Read from LANG env variable with fallback to UTF-8. -v, --verbose Show verbose messages on stderr SEE ALSO
The full documentation for mumble-server-cli is maintained as a Texinfo manual. If the info and mumble-server-cli programs are properly installed at your site, the command info mumble-server-cli should give you access to the complete manual. AUTHOR
Mumble-Django and mumble-server-cli have been written by Michael Ziegler <diese-addy@funzt-halt.net>. mumble-server-cli February 2010 MUMBLE-SERVER-CLI(1)
All times are GMT -4. The time now is 10:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy