Sponsored Content
Full Discussion: compare null with non-null
Top Forums Shell Programming and Scripting compare null with non-null Post 302094998 by nitin on Thursday 2nd of November 2006 12:48:14 PM
Old 11-02-2006
Here is a sample data:

"","","SGP0000","Yes","Support","100006;","","charters","","Charters","xxx@xx.com","","9/29/2006 10:00:37 AM","9/29/2006 10:07:36 AM","10/24/2006 8:14:18 AM","Charters"

I've truncated most of the fields. So, there are some fields which may have time and date stamps etc. Lets compare the first field, it is null. Well it has "" that but for database standpoint it is null. I guess I could strip that using vi and really make it a null. The other file may have some thing like this:

"Charter group","","SGP0000","Yes","Support","100006;","","charters","","Charters","xxx@xx.com","","10/30/2006 10:00:26 AM","10/31/2006 10:11:45 AM","10/29/2006 9:18:21 AM","Charters"

So I would like to report that the first field has a diff. However, in field 13, 14, time stamps are different, I don't want that to be reported. The problem is that I can't always tell where these time fields will be. That usually depends on the DBA and developer, how they out put the data.


Thanks,
Nitin

Last edited by nitin; 11-02-2006 at 03:10 PM..
 

10 More Discussions You Might Find Interesting

1. 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

2. Shell Programming and Scripting

> /dev/null

hello all, In many shell scripts i found '> /dev/null' , i am not able to get this, will any one please explain why we are using this. thanks sudha (2 Replies)
Discussion started by: rrs
2 Replies

3. UNIX for Dummies Questions & Answers

How to compare null and space using single if condition

Hi I have a input file with many fields and each filed will be with in double quotes(""). i want to check fields contains balnk,null or space using condition using if. when i write code as below for if condition its not working a=`awk -F ',' '{gsub("\"", "", $1);'NF==0';printf $1}'... (3 Replies)
Discussion started by: jayakumarrt
3 Replies

4. Shell Programming and Scripting

/dev/null

Hi expert, May I know what is the difference between below cron tab entry ? 0,12 * * * * /abc/myscript.sh > /dev/null 2>&1 0,12 * * * * /abc/myscript.sh (7 Replies)
Discussion started by: olaris
7 Replies

5. Shell Programming and Scripting

/dev/null what is the use of it?

when do you use the path /dev/null (3 Replies)
Discussion started by: webmunkey23
3 Replies

6. UNIX for Advanced & Expert Users

How to Compare Null values??

Hi, Can someone help me comparing Null values. Scenario is as follows: I have a variable which "cache_prd" which can have either some integer or nothing(Null) if it is integer I have to again do some comparision but these comparisons give me this error:( "line 32: [: 95: unary operator... (3 Replies)
Discussion started by: Yagami
3 Replies

7. 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

8. 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

9. Shell Programming and Scripting

Check for null

Hi Champs!!! im a newbie in unix, need ur expert help for my problem... I need to search if there are any "NULL" entries in the string String without Null Str1: 203652|1000003653|tellt|RUPV|4649|1|07/28/2011 01:56:12 String with Null (RUPV is removed) Str2:... (5 Replies)
Discussion started by: guruprasad7
5 Replies

10. 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
ldns(3) 						     Library Functions Manual							   ldns(3)

NAME
ldns_rr_descriptor, ldns_rr_descript, ldns_rr_descriptor_minimum, ldns_rr_descriptor_maximum, ldns_rr_descriptor_field_type- SYNOPSIS
#include <stdint.h> #include <stdbool.h> #include <ldns/ldns.h> ldns_rr_descriptor(); const ldns_rr_descriptor* ldns_rr_descript(uint16_t type); size_t ldns_rr_descriptor_minimum(const ldns_rr_descriptor *descriptor); size_t ldns_rr_descriptor_maximum(const ldns_rr_descriptor *descriptor); ldns_rdf_type ldns_rr_descriptor_field_type(const ldns_rr_descriptor *descriptor, size_t field); DESCRIPTION
ldns_rr_descriptor() ldns_rr_descript() returns the resource record descriptor for the given rr type. type: the type value of the rr type Returns the ldns_rr_descriptor for this type ldns_rr_descriptor_minimum() returns the minimum number of rdata fields of the rr type this descriptor describes. descriptor: for an rr type Returns the minimum number of rdata fields ldns_rr_descriptor_maximum() returns the maximum number of rdata fields of the rr type this descriptor describes. descriptor: for an rr type Returns the maximum number of rdata fields ldns_rr_descriptor_field_type() returns the rdf type for the given rdata field number of the rr type for the given descriptor. descriptor: for an rr type field: the field number Returns the rdf type for the field AUTHOR
The ldns team at NLnet Labs. Which consists out of Jelte Jansen and Miek Gieben. REPORTING BUGS
Please report bugs to ldns-team@nlnetlabs.nl or in our bugzilla at http://www.nlnetlabs.nl/bugs/index.html COPYRIGHT
Copyright (c) 2004 - 2006 NLnet Labs. Licensed under the BSD License. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. SEE ALSO
ldns_rr, ldns_rdf. And perldoc Net::DNS, RFC1034, RFC1035, RFC4033, RFC4034 and RFC4035. REMARKS
This manpage was automaticly generated from the ldns source code by use of Doxygen and some perl. 30 May 2006 ldns(3)
All times are GMT -4. The time now is 09:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy