Please clear the following doubt.
char str2 = "HelloWorld";
int len = strlen(str2);
strncpy(str1, str2, len);
str1 = '\0';
In the above program i'm initializing the 10th byte of str1 to null.
what will happen to the memory of... (13 Replies)
i want to match a string using perl that has got 5 pluses(+++++).
i am using a function for this.
... (6 Replies)
while read line
str1=`grep 'customernumberR11' file1 | cut -c 20-21`
str2=`grep 'newnumberR11' file1 | cut -c 15-16`
if ; then
sed -e "s/newnumberR11/ s/$str2/\$str1/g" $line
done < file1 (4 Replies)
str1="this oracle data base record"
str2="one two three four five"
str1 and str2 have the same column but they are not fixed columns.
I can do it with "paste" but I do not want to create file everytime the
script runs from... (2 Replies)
as explained in the title, here is what I want:
str1="name1 name2 name3"
I know that match(str1,str2) will return 1, but I want that match(str1,str3) returns 0 (when it also returns 1...)
Is there a way to get that exact matching process done... (6 Replies)
I want to print a string say "str1 str2 str3 str4" using printf.
If I try printing it using printf it is printing as follows.
btw I'm working in AIX.
This is my first post in this forum :)
rakesh (4 Replies)
This might be a dummy question, but is there a command in UNIX that compare two strings character-by-character and display the difference?
---------- Post updated at 11:25 AM ---------- Previous update was at 10:32 AM ----------
Or probably what I'm looking is how to break a string into... (3 Replies)
can someone please help me!!! urgent!
I have a strange issue here. I grep for 2 strings from a txt files and compare the string value. Though the string values are the same, they are compared as different values. Please help
Here I grep for 2 different field values... (3 Replies)
I have a script which has two output formats in which i'am getting the two different output format in str1 and str2.So i want to get the output if the format is like str1 then i have to copy that into a directory or str2 format means it should be moved.This script i'am executing in shell script... (4 Replies)
Hi I tried the following string comparison script in Ksh88
echo "Not Equal"
Though str1 and str2 are not equal the script output says Equal .
Please correct me
Thanks (2 Replies)
Here is the sample code:
if ]; then
echo "same string"
echo "different string"
Given that ? implies 0 or 1 match of preceding character, I was expecting the output to be "different string", but I am seeing "same string".
Am I not using the... (3 Replies)