09-12-2006
hi
is there any reason that you need to check that the names do not contain numbers and stuffs like that??
i could just use grep to search against your telephone directory using the search term, and simply flag out to user "Entry not found" , if it does not match what user types in.
If need be, i can just provide a simple help message telling the user what he can or cannot enter as a search term when the grep fails..
It would be simpler this way..well at least to me...
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am creating a script that will automatically use sftp to connect to a site and download a file, extract the tar and then delete the tar file once completed.
What I am stuck on is the error checking for this process.
Here is the code so far:
Now this works for me as is, but i need... (0 Replies)
Discussion started by: xianoth
0 Replies
2. Shell Programming and Scripting
Hi,
I would like to know given executing a file with inputs, I would like to know when does it terminate /abort abnormally.
I tried to append an echo $? after executing my program which is in C. However, there is nothing..It shows 0 even though the program actually exit.
my command is... (1 Reply)
Discussion started by: ahjiefreak
1 Replies
3. UNIX for Dummies Questions & Answers
Hi everyone,
I am writing a script. As a part of this script, I wanted to check the space of few mounts, If the space usage percentage of the mount crosses over a certain limit then i wanted to display a warning message. The following is the command
df -k | awk ' { if (($6 == "/export/temp")... (4 Replies)
Discussion started by: Sheethal
4 Replies
4. Shell Programming and Scripting
Hi All,
I have a written a scell script which checks the existence of a directory. The dierctory name is read from property file. Though the dierctory exists but it says - it does not exist--
Find my code below --
#! /bin/ksh
#Tibco Properties file is inclusion
.... (5 Replies)
Discussion started by: supriyabv
5 Replies
5. UNIX for Dummies Questions & Answers
Hello all
I am having problems using a bash script to read the input from the user and checking that its a valid number. I only want the user to input a maximum of a 3 number string (321 , 521 , 871 etc.). Anything longer or that includes a chararcter or symbol will display an error message.
... (8 Replies)
Discussion started by: ChrisHoogie
8 Replies
6. Programming
Hey guys i am facing a problem in my sql statement. I am trying to check if there is such a value in the database.
Code:
string NewMovie = "ww";
string queryText ;
queryText = "Select * from movie_info WHERE movie_title = '"+ NewTitle +"'";
... (1 Reply)
Discussion started by: gregarion
1 Replies
7. Programming
This is the source code:
#include <pwd.h>
#include <iostream>
#include <string.h>
using namespace std;
int main()
{
struct passwd *user;
char login="alex", password="qwertyuiop";
if ((user= getpwnam(login)) == NULL)
cout << "No such user\n";
else if... (24 Replies)
Discussion started by: hakermania
24 Replies
8. Shell Programming and Scripting
I am currently wrapping up a assignment for one of my classes. I need help writing some error checking logic. The problems I am having are:
keeping track of the records I have deleted and reported it back using echo.
I have no idea how to do this.
ensuring that line numbers fall... (1 Reply)
Discussion started by: Boltftw
1 Replies
9. Shell Programming and Scripting
Hello Everyone,
I have a process that should be always running. Unfortunately, this process is getting down almost every 10 minutes. I want to make a script that verify the state of this process: If the process is up, the script shouldn't do nothing and if it's down he should run it.
Can... (3 Replies)
Discussion started by: adilyos
3 Replies
10. Shell Programming and Scripting
Hi All,
I am facing a problem while checking for existence of file over ssh !
Basically, i want to ssh and check if file exists.. If file exists return 1. If file does not exits return 0 (or any value)
I am using the below code
file_avail=`ssh username@host "if ]; then exit 1;... (10 Replies)
Discussion started by: galaxy_rocky
10 Replies
YAZ_HITS(3) 1 YAZ_HITS(3)
yaz_hits - Returns number of hits for last search
SYNOPSIS
int yaz_hits (resource $id, [array &$searchresult])
DESCRIPTION
yaz_hits(3) returns the number of hits for the last search.
PARAMETERS
o $id
- The connection resource returned by yaz_connect(3).
o $searchresult
- Result array for detailed search result information.
RETURN VALUES
Returns the number of hits for the last search or 0 if no search was performed.
The search result array (if supplied) holds information that is returned by a Z39.50 server in the SearchResult-1 format part of a search
response. The SearchResult-1 format can be used to obtain information about hit counts for various parts of the query (subquery). In par-
ticular, it is possible to obtain hit counts for the individual search terms in a query. Information for first subquery is in $array[0],
second subquery in $array[1], and so forth.
searchresult members
+--------------------+---------------------------------------+
| Element | |
| | |
| | Description |
| | |
+--------------------+---------------------------------------+
| | |
| id | |
| | |
| | Sub query ID2 (string) |
| | |
| | |
| count | |
| | |
| | Result count / hits (integer) |
| | |
| | |
| subquery.term | |
| | |
| | Sub query term (string) |
| | |
| | |
|interpretation.term | |
| | |
| | Interpretated sub query term (string) |
| | |
| | |
|recommendation.term | |
| | |
| | Recommended sub query term (string) |
| | |
+--------------------+---------------------------------------+
Note
The SearchResult facility requires PECL YAZ 1.0.5 or later and YAZ 2.1.9 or later.
Note
Very few Z39.50 implementations support the SearchResult facility.
PHP Documentation Group YAZ_HITS(3)