I found below script to check whether the variable is a digit in ksh.
############################
#!/bin/ksh
REPLY="3f"
if ]*\)'` != ${REPLY} && "${REPLY}" != "0" ]]
then
print "is digit\n"
else
print "not digit\n"
fi
############################
Although it works fine, but... (6 Replies)
I need to find the index of last '|' (highlighted in bold) in awk :
|ifOraDatabase.Lastservererr<>0then|iferr_flag<>0then|end if
Please suggest a way... Thanks (5 Replies)
I have a line "My name is Deepak"
How can i search a string Deepak in the line and find out its index position.
Here in this case the result should be 12. (3 Replies)
I have to write a c program which takes a 3 digit number n and calculates the value of (2^n)+1 and then determines the number is prime or not.
I have tried to first calculate the value of 2^n and then adding one to it and then apply the logic of prime number.
but the ultimate problem is that... (7 Replies)
Hi Masters,
here is my req
I have to create a 12 digit string which includes the user i/p
Like if user input 2334 then the string will be 233411111111 ,if the user inputs 23345 then the string will be 233451111111 ,
So we dont know how many digits will the user inputs output will be 12... (16 Replies)
Hi,
I have a string like the following:
/db1/data/GLIDER/SYSTEM.dbf
need to find the postion where "SYSTEM.dbf" starts, so I tried:
LOCATION=/db1/data/GLIDER/SYSTEM.dbf
$ expr index $LOCATION SYSTEM
expr: syntax error
$ expr index "$LOCATION" SYSTEM
expr: syntax error
... (5 Replies)
Hi every body!
I wrote script on Fedora (bash shell) to check whether a tring enter from user console is start with a uppercase/lowercase letter or a digit. But with this script i have some problem when I enter from character from 'b' to 'z' --> result is uppercase. This code look like ok but i... (9 Replies)
Hi,
I need to use the output of previous command in the next command while using pipe.
Like I am reading a file then I am fetching first line from a file and then I want to know the location of character 'e' in that line.
cat filename|sed -n 1p|expr index ------ e
In above example I... (5 Replies)
If i'm given a string like "abc-def-1.2.3", how would I return "1"? I'm new to scripting and got stumped on this problem. Thanks in advance! (7 Replies)
Discussion started by: atsim
7 Replies
LEARN ABOUT HPUX
dteditorfind
DtEditorFind(library call) DtEditorFind(library call)
NAME
DtEditorFind -- search for the next occurrence of a string in a DtEditor widget
SYNOPSIS
#include <Dt/Editor.h>
Boolean DtEditorFind(
Widget widget,
char *find);
DESCRIPTION
The DtEditorFind function searches for the next occurrence (relative to the insertion cursor) of a string. The string is either the last
find string value specified in the Find/Change dialog (see DtEditorInvokeFindChangeDialog(3)) or is passed in as an argument.
The widget argument specifies the DtEditor widget ID.
The find argument specifies the string to search for. If find is NULL, DtEditorFind uses the last string specified in the Find field of
the Find/Change dialog. If the string is not found by the time the end of the document is reached, the search continues at the beginning
of the document, stopping at the character before the insertion cursor.
For a complete definition of the DtEditor widget and its associated resources, see DtEditor(3).
RETURN VALUE
Upon successful completion, the DtEditorFind function returns True if the search string was found; otherwise, it returns False.
SEE ALSO
Dt/Editor.h - DtEditor(5), DtEditor(3), DtEditorChange(3), DtEditorInvokeFindChangeDialog(3).
DtEditorFind(library call)