Sponsored Content
Top Forums Shell Programming and Scripting If condition to check null variable Post 302831399 by vidyadhar85 on Thursday 11th of July 2013 02:02:36 AM
Old 07-11-2013
put NULL in double quotes.. and if you are equating string better use = than -eq
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

check for NULL variable

Hello I want to check for NULL variable.. but this is not working..please help thanks in advance esham (2 Replies)
Discussion started by: esham
2 Replies

2. Shell Programming and Scripting

How can find Null value in If condition

Hi, i wrote If Conditions in my script, it's returns null and some values. but i am unable to find when Null value getting. bec we need modification according null vales. pls help me on this. (2 Replies)
Discussion started by: koti_rama
2 Replies

3. Shell Programming and Scripting

how to check null variable

korn shell If then update_smartcare_user_password "$u_id" else echo "Not a database user" fi i get this error Syntax error at line *** : `then' is not expected. what should i do. I want to check whether $a is null or not. (2 Replies)
Discussion started by: sachin.gangadha
2 Replies

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

5. Shell Programming and Scripting

csh if loop variable condition check peroblem

Hi, I have variables like var1 var2 var3 var4 in if loop i am trying to check the condition if(variable == "var") then echo $variable endif (0 Replies)
Discussion started by: vasanth.vadalur
0 Replies

6. Shell Programming and Scripting

check for null

hi, i have 3 lines of output , if second line exists then only condition within the if loop has to exeute other wise it has exit from loop. i had tried like this but not getting please help me ... Code: if ; then echo "success" else echo "" Use code tags please,... (8 Replies)
Discussion started by: sreelu
8 Replies

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

8. Shell Programming and Scripting

HELP with AWK one-liner. Need to employ an If condition inside AWK to check for array variable ?

Hello experts, I'm stuck with this script for three days now. Here's what i need. I need to split a large delimited (,) file into 2 files based on the value present in the last field. Samp: Something.csv bca,adc,asdf,123,12C bca,adc,asdf,123,13C def,adc,asdf,123,12A I need this split... (6 Replies)
Discussion started by: shell_boy23
6 Replies

9. Shell Programming and Scripting

Check null value in xml

Hi, I have a log file which is having some xml tags. I need to check the value for a particular xml field is null or not and if it is null i have to add current time as the value for that xml field. I tried below code to check whether the word count is 0. But even if the xml field is null it... (16 Replies)
Discussion started by: Neethu
16 Replies

10. Shell Programming and Scripting

Checking for null condition in a UNIX variable

i have this code for i in `cat sql_output.txt` do -- some script commands done sql_output.txt has 1 column with employee_ids If the sql_output.txt is null then the do loop should not execute. How can i implement this. for i in `cat sql_output.txt` If i is null or empty then ... (5 Replies)
Discussion started by: rafa_fed2
5 Replies
BuildStrings(1) 					    BSD General Commands Manual 					   BuildStrings(1)

NAME
/usr/bin/BuildStrings -- Generate header (.h) or resource (.r) file from text files SYNOPSIS
/usr/bin/BuildStrings [-define variable] [-header] [-attributes attributeList] [-type filekind] -id ResID -in path -out path DESCRIPTION
The /usr/bin/BuildStrings command translates a text file into a resource or header file for use in localizing your Carbon application. The input file is a series of newline-separated pairs of newline-separated strings. Each pair of strings represents the "base" string and the localized equivalent. When generating a resource file, /usr/bin/BuildStrings generates a STR# resource containing only the localized equiva- lents (which must be enclosed in double quotes in the source file). When generating the header file, /usr/bin/BuildStrings generates a C header file with #define directives for each of the base strings (which must be valid C preprocessor symbols) equating each to the ordinal number of the string in the STR# resource. Your C/C++ source code can use these preprocessor macros, along with standard Resource Manager calls (like GetIndString) to load the appropriate localized string. The source file may include #ifdef/#endif (or #ifndef/#endif) directives to conditionally include different pairs of strings, e.g. for debug- ging builds or different versions. Note that these are the only preprocessor directives allowed in the source file. When generating a resource file, you can set the resource ID and attributes of the STR# resource by providing /usr/bin/BuildStrings with the appropriate command-line options. You can use /usr/bin/BuildStrings with several different sets of strings in the same application, for example, error strings and warning strings. The -type argument customizes some #defines in the generated header file so there are no conflicts. The /usr/bin/BuildStrings command accepts the following arguments: -header Generate a header file. If not provided, default is resource file format. Note that the file extension is not provided automati- cally; your output file name must have the appropriate .h or .r extension. -define variable Defines variable for use in #ifdef or #ifndef conditionals. No value may be assigned to variable. This argument may be repeated for any number of variables. -id ResID The resource ID for the STR# resource. There is no support for setting the resource name. -attributes attribute Resource attributes for the STR# resource definition (such as locked, preload, etc.) These are provided after the resource name in the resource definition. This argument may be repeated for any number of attributes. It is ignored if generating a header. -type filekind Customizes three preprocessor variables (MinValidFoo, MaxValidFoo, FooRsrcID) #defined in a generated header file. Note that if this argument is not provided, the default is the literal string "(null)", which will cause compile errors in the header file. -in path The input file, a set of newline-separated pairs of newline-separated strings. The first string of the pair is ignored for the resource file (but is provided in a comment) and is used as the preprocessor symbol in the header file. The second string of the pair is used as the resource string in the resource file and is ignored in the header file (but is provided in a comment), and must be enclosed in double-quotes in your source file. -out path The output file. Note that you should provide the appropriate file extension; it is not provided automatically according to the -header flag. SEE ALSO
Rez(1), DeRez(1) Mac OS X April 12, 2004 Mac OS X
All times are GMT -4. The time now is 10:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy