Sponsored Content
Top Forums Shell Programming and Scripting Create a UNIX script file with multiple commands Post 302938437 by balajesuri on Monday 16th of March 2015 09:03:54 AM
Old 03-16-2015
1. How do you know pmrep connect "is working"?
2. And even if anyone supplied you with a sample script, you will most probably face the same error.
3. Can you check pmrep manuals if there are any connection settings/config that you have to take care of?
4. Try to understand the fundamentals of pmrep connect - How does it establish a connection with the repository.. what details are required to establish a connection.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Using tab in script to create file of commands

from CLI pressing Tab and character like a shows result of the commands starting with a, can i use this in a script too and post the results to a file? thanks (1 Reply)
Discussion started by: tvrman
1 Replies

2. UNIX for Dummies Questions & Answers

running a simple script file with multiple commands

I'm trying to run a script file with multiple commands that I would normally type into the command line. The commands are: #!/bin/bash diff Test1.o0 /usr3/ronelso4/Desktop/verificationKPC/Test1.o0 > differences2 diff Test1a.o0 /usr3/ronelso4/Desktop/verificationKPC/Test1a.o0 >> differences2... (1 Reply)
Discussion started by: knelson
1 Replies

3. Shell Programming and Scripting

to create a phone book using shell script and unix commands

can you help me to create a phone book with add, delete, modify with first name, last name, middle name, phone no(multiple ph no), address, email address, notes or comments to store about the contact and groups that hold for the contact.. i am new to this linux environment. please guide me. ... (1 Reply)
Discussion started by: monster11209
1 Replies

4. Shell Programming and Scripting

Running multiple unix commands in a single script

Hi, I would like to write a script with include more than 6 unix commands. my script like below: echo " script started" ls -ld bdf | grep "rama" tail -10 log.txt ... .. ... now, i want to run above unix commands one by one. example: first the ls -ld command will be... (3 Replies)
Discussion started by: koti_rama
3 Replies

5. Programming

help need in the perl script that create one xml file form multiple files.

Hi every one, Please excuse me if any grammatical mistakes is there. I have multiple xml files in one directory, I need to create multiple XML files into one XML file.example files like this</p> file1:bvr.xml ... (0 Replies)
Discussion started by: veerubiji
0 Replies

6. Shell Programming and Scripting

Create a GUI from where in we can execute unix commands

Hello Experts, In my current job I need to upgrade a web GUI to execute Unix commands in a server....I am completely new to programming--So can anyone here help me out with initial steps... Please notice that statement completely new to programming means-I never did it, SO I might keep on coming... (1 Reply)
Discussion started by: mhadi
1 Replies

7. Shell Programming and Scripting

Need help to create multiple file using shell script

HI, i created the below script to create the multiple files, iam not getting the required output, Please advice. #!/bin/sh v_date=$1 # argument will come as daymonthyear eg : 151112 v_day=`echo $v_date | cut -c 1-2` v_mon=`echo $v_date | cut -c 3-4` v_year=`echo $v_date | cut -c 5-6`... (4 Replies)
Discussion started by: jagguvarma
4 Replies

8. Shell Programming and Scripting

Create Multiple UNIX Files for Multiple SQL Rows output

Dear All, I am trying to write a Unix Script which fires a sql query. The output of the sql query gives multiple rows. Each row should be saved in a separate Unix File. The number of rows of sql output can be variable. I am able save all the rows in one file but in separate files. Any... (14 Replies)
Discussion started by: Rahul_Bhasin
14 Replies

9. Shell Programming and Scripting

Get multiple values from an xml file using one of the following commands or together awk/perl/script

Hello, I have a requirement to extract the value from multiple xml node and print out the values to new file to compare. Would be done using either awk/perl or some unix script. For example sample input file: ..... ..... <factories xmi:type="resources.jdbc:DataSource"... (2 Replies)
Discussion started by: slbmind
2 Replies

10. UNIX for Dummies Questions & Answers

Create a file on UNIX with multiple columns on certain condition

I need to write the list of files to a new file in one column , the second column would contain the first line of that file (header record extracted through head -1 ) and the third column would contain the last record of that file (trailer record tail -1 ) . Example :- folder where the files... (8 Replies)
Discussion started by: IshuGupta
8 Replies
connect(3XNET)					   X/Open Networking Services Library Functions 				    connect(3XNET)

NAME
connect - connect a socket SYNOPSIS
cc [ flag ... ] file ... -lxnet [ library ... ] #include <sys/socket.h> int connect(int socket, const struct sockaddr *address, socklen_t address_len); DESCRIPTION
The connect() function requests a connection to be made on a socket. The function takes the following arguments: socket Specifies the file descriptor associated with the socket. address Points to a sockaddr structure containing the peer address. The length and format of the address depend on the address fam- ily of the socket. address_len Specifies the length of the sockaddr structure pointed to by the address argument. If the socket has not already been bound to a local address, connect() will bind it to an address which, unless the socket's address fam- ily is AF_UNIX, is an unused local address. If the initiating socket is not connection-mode, then connect() sets the socket's peer address, but no connection is made. For SOCK_DGRAM sockets, the peer address identifies where all datagrams are sent on subsequent send(3XNET) calls, and limits the remote sender for subse- quent recv(3XNET) calls. If address is a null address for the protocol, the socket's peer address will be reset. If the initiating socket is connection-mode, then connect() attempts to establish a connection to the address specified by the address argument. If the connection cannot be established immediately and O_NONBLOCK is not set for the file descriptor for the socket, connect() will block for up to an unspecified timeout interval until the connection is established. If the timeout interval expires before the connection is established, connect() will fail and the connection attempt will be aborted. If connect() is interrupted by a signal that is caught while blocked waiting to establish a connection, connect() will fail and set errno to EINTR, but the connection request will not be aborted, and the connection will be established asynchronously. If the connection cannot be established immediately and O_NONBLOCK is set for the file descriptor for the socket, connect() will fail and set errno to EINPROGRESS, but the connection request will not be aborted, and the connection will be established asynchronously. Subsequent calls to connect() for the same socket, before the connection is established, will fail and set errno to EALREADY. When the connection has been established asynchronously, select(3C) and poll(2) will indicate that the file descriptor for the socket is ready for writing. The socket in use may require the process to have appropriate privileges to use the connect() function. USAGE
If connect() fails, the state of the socket is unspecified. Portable applications should close the file descriptor and create a new socket before attempting to reconnect. RETURN VALUES
Upon successful completion, connect() returns 0. Otherwise, -1 is returned and errno is set to indicate the error. ERRORS
The connect() function will fail if: EADDRNOTAVAIL The specified address is not available from the local machine. EAFNOSUPPORT The specified address is not a valid address for the address family of the specified socket. EALREADY A connection request is already in progress for the specified socket. EBADF The socket argument is not a valid file descriptor. ECONNREFUSED The target address was not listening for connections or refused the connection request. EFAULT The address parameter can not be accessed. EINPROGRESS O_NONBLOCK is set for the file descriptor for the socket and the connection cannot be immediately established; the connec- tion will be established asynchronously. EINTR The attempt to establish a connection was interrupted by delivery of a signal that was caught; the connection will be established asynchronously. EISCONN The specified socket is connection-mode and is already connected. ENETUNREACH No route to the network is present. ENOTSOCK The socket argument does not refer to a socket. EPROTOTYPE The specified address has a different type than the socket bound to the specified peer address. ETIMEDOUT The attempt to connect timed out before a connection was made. If the address family of the socket is AF_UNIX, then connect() will fail if: EIO An I/O error occurred while reading from or writing to the file system. ELOOP Too many symbolic links were encountered in translating the pathname in address. ENAMETOOLONG A component of a pathname exceeded NAME_MAX characters, or an entire pathname exceeded PATH_MAX characters. ENOENT A component of the pathname does not name an existing file or the pathname is an empty string. ENOTDIR A component of the path prefix of the pathname in address is not a directory. The connect() function may fail if: EACCES Search permission is denied for a component of the path prefix; or write access to the named socket is denied. EADDRINUSE Attempt to establish a connection that uses addresses that are already in use. ECONNRESET Remote host reset the connection request. EHOSTUNREACH The destination host cannot be reached (probably because the host is down or a remote router cannot reach it). EINVAL The address_len argument is not a valid length for the address family; or invalid address family in sockaddr structure. ENAMETOOLONG Pathname resolution of a symbolic link produced an intermediate result whose length exceeds PATH_MAX. ENETDOWN The local interface used to reach the destination is down. ENOBUFS No buffer space is available. ENOSR There were insufficient STREAMS resources available to complete the operation. EOPNOTSUPP The socket is listening and can not be connected. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
close(2), poll(2), accept(3XNET), bind(3XNET), getsockname(3XNET), select(3C), send(3XNET), shutdown(3XNET), socket(3XNET), attributes(5), standards(5) SunOS 5.11 10 Jun 2002 connect(3XNET)
All times are GMT -4. The time now is 04:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy