Sponsored Content
Full Discussion: Comparing Two Strings
Top Forums Shell Programming and Scripting Comparing Two Strings Post 302156780 by Anji on Wednesday 9th of January 2008 05:10:06 AM
Old 01-09-2008
I have given the space too

but I am getting the same error as above.....

This silly mistake making me lot of trouble

Can you plz help me out..........

thanks
anji
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

comparing two strings

Hi How do i compare two strings in shell script. Below is an example but I am not getting the desired output, plz help if then echo success fi I am not getting the desired output if I do this. plz help (24 Replies)
Discussion started by: ragha81
24 Replies

2. UNIX for Advanced & Expert Users

Comparing strings

I have two strings a=Mar22 b=may21 how can I compare them Is this fine if then; . ... else .... fi or if then (2 Replies)
Discussion started by: yakyaj
2 Replies

3. Shell Programming and Scripting

comparing strings

i have a string in a file which gets repeated number of times like below: rpttxt("abc") . . rpttxt("REP_TITLE") rpttxt("BOS_TITLE") . . . . and so on using awk or grep how can i comapre the string( as the second half keeps varying) and store it in a temporary variable? I am using the... (3 Replies)
Discussion started by: agarwal
3 Replies

4. Shell Programming and Scripting

comparing 2 strings

hi i have 2 strings. i want to compare the strings. please help (2 Replies)
Discussion started by: satish@123
2 Replies

5. Shell Programming and Scripting

comparing two strings

hi All i am facing prob in comparing two strings that have two word. below is the code snippet. checkValidates="file validates" file3_name="file" if then echo "file" $file3_name "is validated successfully" fi when i run this i get the error as -bash: [: too many arguments ... (1 Reply)
Discussion started by: infyanurag
1 Replies

6. Shell Programming and Scripting

Comparing strings using nawk

Hello All Please I have got a file called DATE.tex which consist of 01-04-2008_12:00:00 01-04-2005_12:00:00 01-04-2003_12:00:00 01-04-2007_12:00:00 01-04-2002_12:00:00 01-04-2009_12:00:00 I want to use nawk to print out the dates >=01-04-2009_12:00:00 I tried this cat plnt.new |... (6 Replies)
Discussion started by: ganiel24
6 Replies

7. Shell Programming and Scripting

Comparing strings with sed

Input: The the the the Output: not-same same What would be the sed command to do this? (7 Replies)
Discussion started by: cola
7 Replies

8. UNIX for Dummies Questions & Answers

Strings comparing incorrectly

Hello I'm very new to Linux and shell scripting so I only know basic stuff. I'm making a script with the purpose of finding the longest string or word in a file. Here's what I got so far: #!/bin/bash longest="" for i in $(strings -n $1); do if ] then longest=$i fi done echo $longest... (4 Replies)
Discussion started by: SCB
4 Replies

9. Shell Programming and Scripting

comparing strings as ints

Hi, So I got his code below. $year is a string of 2010,2011 etc. I guess I want to convert $year to an integer so I can do my if statement to see if the year string is greater than 2010? Or how could I do this? Right now I get a syntax error doing this. if; then do stuff fi (2 Replies)
Discussion started by: vsekvsek
2 Replies

10. Shell Programming and Scripting

Comparing Strings in ksh88

Hi I tried the following string comparison script in Ksh88 #!/bin/ksh str1='aC' str2='ABC' if then echo "Equal" else echo "Not Equal" fi Though str1 and str2 are not equal the script output says Equal . Please correct me Thanks (2 Replies)
Discussion started by: smile689
2 Replies
datalock(3C)															      datalock(3C)

NAME
datalock() - lock process into memory after allocating data and stack space SYNOPSIS
DESCRIPTION
allocates at least datsiz bytes of data space and stsiz bytes of stack space, then locks the program in memory. The data space is allo- cated by (see malloc(3C)). After the program is locked, this space is released by (see malloc(3C)), making it available for use. This allows the calling program to use that much space dynamically without receiving the signal. The effective user ID of the calling process must be super-user or be a member of or have an effective group ID of a group having PRIV_MLOCK access to use this call (see setprivgrp(2) in getprivgrp(2)). EXAMPLES
The following call to allocates 4096 bytes of data space and 2048 bytes of stack space, then locks the process in memory: RETURN VALUE
returns -1 if cannot allocate enough memory or if returned an error (see plock(2)). WARNINGS
Multiple datalocks cannot be the same as one big one. Methods for calculating the required size are not yet well developed. AUTHOR
was developed by HP. SEE ALSO
getprivgrp(2), plock(2), thread_safety(5). datalock(3C)
All times are GMT -4. The time now is 01:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy