10 More Discussions You Might Find Interesting
1. Linux
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
2. Shell Programming and Scripting
hi,
Am trying to find a solution for finding a null column value inside a loop using array.
for eg:
two
three
five
From the above array myarray,myarray and myarray having null values. But when am trying to check that space using some condition its not working.
for (( i=0;... (4 Replies)
Discussion started by: rogerben
4 Replies
3. Shell Programming and Scripting
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
4. Shell Programming and Scripting
i have an array (with each element length "n") which is dynamic and has alphanumeric characters.
i want to check if any of the elements of the array are null and replace it with a string of "n" zeros for that element.
can you suggest me a code for the same. (1 Reply)
Discussion started by: mumbaiguy07
1 Replies
5. Shell Programming and Scripting
Hi I need to check the output of a string to null. For eg the output I get for $KIT is empty. So want to echo something when the output is empty.
How can I do that?
Thanks in advance (6 Replies)
Discussion started by: Ananthdoss
6 Replies
6. Shell Programming and Scripting
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. Programming
void disptree(node *ptr)
{
if ((ptr->left) !=NULL)
disptree(ptr->left);
cout<<"Position:"<<ptr->pos<<" Data:"<<ptr->data<<endl;
if ((ptr->right)!=NULL;
disptree(ptr->right);
}
i'm getting a segmentation fault at the red line. i cannot understand what's the problem.... (3 Replies)
Discussion started by: vijaymrt
3 Replies
8. Shell Programming and Scripting
Hi all
I have a file that i'm running and exec(cat ./dat) against..and putting its contents into any array, then doing an exploding the array into a multi-dimension array...
The 15 multi-dimensional arrays have elements that are null/empty, I would like to remove/unset these elements and then... (2 Replies)
Discussion started by: zeekblack
2 Replies
9. Shell Programming and Scripting
Dear All,
I'm glad that I've also joined in this forum. Good work fellas... :b:
Keep going...! :)
I am having a .csv file where I am reading the values with comma(,) as delimiter. After reading each and every values, I would like to check whether it is empty (say null or blank spaces). How... (4 Replies)
Discussion started by: ganapathi.t
4 Replies
10. 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