05-18-2009
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 expected"
To avoid this I used another variable chk= which has null value in it but again at some point when integer comes in variable it gives me same error.
Please suggest me how to catch this error.
Thanks in advance,
Yagami
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
2. Shell Programming and Scripting
hi all,
iam new to this forum.i have to submit the script EOD.so please help me.
my requirement is to compare two null values..iam trying to compare two null values :One null value output of the storedprocedure and another iam giving spaces in script.
it is giving the error... (11 Replies)
Discussion started by: bbc17484
11 Replies
3. Shell Programming and Scripting
I have a huge file with 20 fileds in each record and each field is seperated by "|". If i want to get all the reocrds that have 18th or for that matter any filed as null how can i do it? Please let me know (3 Replies)
Discussion started by: dsravan
3 Replies
4. UNIX for Dummies Questions & Answers
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
5. Shell Programming and Scripting
Hi
I have a file with the values
abc
res
set
kls
lmn
ops
i want to sort this file with the null values at the bottom of the file
OUTPUT should look like this
abc
kls
lmn
ops (6 Replies)
Discussion started by: vickyhere
6 Replies
6. Shell Programming and Scripting
- I have two files (File 1 and File 2) and the contents of the files are mentioned below.
- I am trying to compare the values of Column1 of File1 with Column1 of File2. If a match is found, print the corresponding value from Column2 of File1 in Column5 of File2.
- I tried to modify and use... (10 Replies)
Discussion started by: Santoshbn
10 Replies
7. Shell Programming and Scripting
Hello everyone
I am doing a join command. Obviously, before I need two files sorted first. ( Both files have headers and have about 2 million lines each one )
The problem is, one of the files has null values in the key to sort (which is the first filed ). For example I have the original... (4 Replies)
Discussion started by: viktor1985
4 Replies
8. Shell Programming and Scripting
Hi All ,
below is my shell program.
!/bin/sh
set -x
#----------------------------------------------------------------------------------------
# Program : weekly_remove_icd_file.sh
# Author :
# Date : 04/06/2013
# Purpose : Execute the script to... (3 Replies)
Discussion started by: krupasindhu18
3 Replies
9. Shell Programming and Scripting
Hi,
i have another issue:
i have three files:
FILE 1
ServiceEventHandler,
Processed,Percentage
5285337,100%
FILE 2
Wallet,
Processed,Percentage
5285337,100% (1 Reply)
Discussion started by: reignangel2003
1 Replies
10. Shell Programming and Scripting
Hi,
I have a csv file with given details
abc.txt
123,ra,point,,there
232,ba,points,home,pheer
I want to get those values and store them in different variables:
Code:
while read line
do
echo $line |awk -F"," '{print $1" "$2" "$3" "$4" "$5"}'|read dbt_acct val_dt crncy AMT... (11 Replies)
Discussion started by: rahulsk
11 Replies
LEARN ABOUT MOJAVE
slapd-null
SLAPD-NULL(5) File Formats Manual SLAPD-NULL(5)
NAME
slapd-null - Null backend to slapd
SYNOPSIS
/etc/openldap/slapd.conf
DESCRIPTION
The Null backend to slapd(8) is surely the most useful part of slapd:
- Searches return success but no entries.
- Compares return compareFalse.
- Updates return success (unless readonly is on) but do nothing.
- Binds other than as the rootdn fail unless the database option "bind on" is given.
- The slapadd(8) and slapcat(8) tools are equally exciting.
Inspired by the /dev/null device.
CONFIGURATION
This slapd.conf option applies to the NULL backend database. That is, it must follow a "database null" line and come before any subsequent
"database" lines. Other database options are described in the slapd.conf(5) manual page.
bind <on/off>
Allow binds as any DN in this backend's suffix, with any password. The default is "off".
EXAMPLE
Here is a possible slapd.conf extract using the Null backend:
database null
suffix "cn=Nothing"
bind on
ACCESS CONTROL
The null backend does not honor any of the access control semantics described in slapd.access(5).
FILES
/etc/openldap/slapd.conf
default slapd configuration file
SEE ALSO
slapd.conf(5), slapd(8), slapadd(8), slapcat(8).
OpenLDAP 2.4.28 2011/11/24 SLAPD-NULL(5)