04-26-2013
unix.com is not a free scriptwriting service.
What have you tried?
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
I have script which downloads the build and copies onto the local machine
I am able to download files in a directory, but unable to get the files in subdierctories.
I am using finddepth to search for sub directories but I am unable to do so.
Here is my code:
... (0 Replies)
Discussion started by: gurukottur
0 Replies
2. Shell Programming and Scripting
Hi All,
I have a file that I need to be able to find a pattern match on a line, search that line for a text pattern, and replace that text.
An example of 4 lines in my file is:
1. MatchText_randomNumberOfText moreData ReplaceMe moreData
2. MatchText_randomNumberOfText moreData moreData... (4 Replies)
Discussion started by: Crypto
4 Replies
3. Shell Programming and Scripting
Dear All,
i want to search particular string and want to replance next line value.
following is the test file.
search string is
tmp,???
,10:1 "???" may contain any 3 character it should remain the same and next line replace with ,10:50
tmp,123 --- if match tmp,??? then... (3 Replies)
Discussion started by: arvindng
3 Replies
4. UNIX for Dummies Questions & Answers
Could someone help me in recursive search and ftp'ing the files to remote server?
The host machine will have
/dir1/dira/list_of_files1
/dir1/dirb/list_of_files2
/dir1/dirc/list_of_files3
.
.
.
so., I need to search from dir1 recursively (only one level down) and find all the files that... (1 Reply)
Discussion started by: brahmi
1 Replies
5. HP-UX
Hello All,
I am trying to connect to ftp server and get the files. Also i need to rename the file in other ftp dir.
rename method is not allowing me to rename the file in other dir. When i tried copy command by using net::FTP:FILE then perl says it is not installed.
Can some body help me to... (2 Replies)
Discussion started by: krsnadasa
2 Replies
6. Shell Programming and Scripting
Hi ,
I have been trying to write a perl script to do this job. But i am not able to achieve the desired result. Below is my code.
my $current_value=12345;
my @users=("bob","ben","tom","harry");
open DBLIST,"<","/var/tmp/DBinfo";
my @input = <DBLIST>;
foreach (@users)
{
my... (11 Replies)
Discussion started by: chidori
11 Replies
7. Shell Programming and Scripting
#Build label and text box
$main->Label(
-text => "Input string below:"
)->pack();
$main->Entry(
-textvariable => \$text456
)->pack();
$main->Button(
-text => "Search",
-command =>
sub {
errchk ($text456)
... (4 Replies)
Discussion started by: popeye
4 Replies
8. UNIX for Beginners Questions & Answers
I have this fileA
TEST FILE ABC
this file contains ABC;
TEST FILE DGHT this file contains DGHT;
TEST FILE 123
this file contains ABC,
this file contains DEF,
this file contains XYZ,
this file contains KLM
;
I want to have a fileZ that has only (begin search pattern for will be... (2 Replies)
Discussion started by: vbabz
2 Replies
9. UNIX for Beginners Questions & Answers
Lets say I have a massive directory which is filled with other directories all filled with different c++ scripts and I want a listing of all the scripts that contain the string: "this string". Is there a way to use a grep search for that? I tried:
grep -lr "this string" *
but I do not... (3 Replies)
Discussion started by: Circuits
3 Replies
LEARN ABOUT REDHAT
hesiod_getservbyname
HESIOD(3) Library Functions Manual HESIOD(3)
NAME
hesiod_getservbyname, hesiod_free_servent - Hesiod functions for retrieving service information
SYNOPSIS
#include <hesiod.h>
struct servent *hesiod_getservbyname(void *context,
const char *name, const char *proto)
void hesiod_free_servent(void *context, struct servent *serv)
cc file.c -lhesiod
DESCRIPTION
This family of functions allows you to retrieve service to port mappings using Hesiod. To perform lookups, you need an initialized Hesiod
context; see hesiod(3) for details. Information is returned in the same format as by getservbyname. It is the caller's responsibility to
call hesiod_free_servent with the returned service entry to free the resources used by the service entry.
Hesiod queries for service information are made using the ``service'' Hesiod type, using the service name as the Hesiod name. The corre-
sponding records should be space-separated lists of strings giving the service name, protocol, port number (in decimal), and zero or more
aliases for the service. There may be multiple records per service name; hesiod_getservbyname will pick the first one whose protocol
matches proto.
RETURN VALUES
On failure, hesiod_getservbyname returns NULL and sets the global variable errno to indicate the error.
ERRORS
hesiod_getservbyname may fail for any of the reasons the routine hesiod_resolve may fail.
SEE ALSO
hesiod(3)
30 November 1996 HESIOD(3)