11-28-2013
Hi Radoulov,
I have sets of tools name with associated IP address.
Like Tool1 -- 127.3.3.1
Tool2 -- 127.3.3.5
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
How can convert a Lower case variable value to an upper case in the kron shell script. (3 Replies)
Discussion started by: dchalavadi
3 Replies
2. Shell Programming and Scripting
Hi,
I have a script as below:
.......................................................................
rpttxt()
{
name="$*"
awk '/'"${name}"'/ {print $2$3$4 }' file_1.txt
}
title="`rpttxt "TITLE"`"
.........................................................................
The... (0 Replies)
Discussion started by: jisha
0 Replies
3. Shell Programming and Scripting
HELLO ALL,
URGENTLY NEEDED A SCRIPT TO SELECT AND DELETE LOWER AND MIXED CASE RECORDS FROM A COLUMN IN A TABLE.
FOR EXAMPLE : Table name is EMPLOYEE and the column name is CITY
and the CITY column records will be: Newyork
washington
... (1 Reply)
Discussion started by: abhilash mn
1 Replies
4. Shell Programming and Scripting
Hi,
In below code, i am expecting the output has
Bye
Bye
But i am getting has
Bye
Hi
Code:
#!/usr/bin/bash
var="Hi"
cat txt.txt | while read var1
do
next="Bye"
case $var in
Hi) (1 Reply)
Discussion started by: Balamani
1 Replies
5. Shell Programming and Scripting
Hi Experts team,
i wish to use switch case in unix.
my req is
case $code in
1111)
echo "1111"
1112)
echo "1112"
*)
echo "default"
esac
see eventhough for particular case 1111 , it is always execute the default statement *), if i code like this.
How can handle... (2 Replies)
Discussion started by: spkandy
2 Replies
6. Shell Programming and Scripting
Hi all,
i have a data array as followes.
ARRAY=DFSG345GGG
ARRAY=234FDFG090
ARRAY=VDFVGBGHH
so on..........
i need all english letters to be change to lower case. So i am expecting to see
ARRAY=dfsg345ggg
ARRAY=234fdfg090
ARRAY=vdfvgbghh
so on........
If i have to copy this data in... (8 Replies)
Discussion started by: usustarr
8 Replies
7. Shell Programming and Scripting
Hi
I want to make string substitution ignoring case for search but respecting case for subtitute. Ex changing all occurences of "original" in a file to "substitute":
original becomes substitute
Origninal becomes Substitute
ORIGINAL becomes SUBSTITUTE
I know this a little special but it's not... (1 Reply)
Discussion started by: kmchen
1 Replies
8. Shell Programming and Scripting
Hello Unix Gurus :
It would be really appreciative if can find a solution for this .
I have records in a file .
I need to Capitalize the records based on condition .
For Example i tried the following Command
COMMAND -->
fgrep "2000YUYU" /export/home/oracle/TST/data.dat | tr '' ''... (12 Replies)
Discussion started by: tsbiju
12 Replies
9. Shell Programming and Scripting
Hi all,
I am trying to find a way to change first letter in a word from lower case to upper case. It should be done for each first word in text or in paragraph, and also for each word after punctuation like
. ; : ! ?I found the following command
sed -i 's/\s*./\U&\E/g' $@ filenamebut... (7 Replies)
Discussion started by: georgi58
7 Replies
LEARN ABOUT PHP
socket_bind
SOCKET_BIND(3) 1 SOCKET_BIND(3)
socket_bind - Binds a name to a socket
SYNOPSIS
bool socket_bind (resource $socket, string $address, [int $port])
DESCRIPTION
Binds the name given in $address to the socket described by $socket. This has to be done before a connection is be established using
socket_connect(3) or socket_listen(3).
PARAMETERS
o $socket
- A valid socket resource created with socket_create(3).
o $address
- If the socket is of the AF_INET family, the $address is an IP in dotted-quad notation (e.g. 127.0.0.1). If the socket is of
the AF_UNIX family, the $address is the path of a Unix-domain socket (e.g. /tmp/my.sock).
o $port (Optional)
- The $port parameter is only used when binding an AF_INET socket, and designates the port on which to listen for connections.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
The error code can be retrieved with socket_last_error(3). This code may be passed to socket_strerror(3) to get a textual explanation of
the error.
EXAMPLES
Example #1
Using socket_bind(3) to set the source address
<?php
// Create a new socket
$sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
// An example list of IP addresses owned by the computer
$sourceips['kevin'] = '127.0.0.1';
$sourceips['madcoder'] = '127.0.0.2';
// Bind the source address
socket_bind($sock, $sourceips['madcoder']);
// Connect to destination address
socket_connect($sock, '127.0.0.1', 80);
// Write
$request = 'GET / HTTP/1.1' . "
" .
'Host: example.com' . "
";
socket_write($sock, $request);
// Close
socket_close($sock);
?>
NOTES
Note
This function must be used on the socket before socket_connect(3).
Note
Windows 9x/ME compatibility note: socket_last_error(3) may return an invalid error code if trying to bind the socket to a wrong
address that does not belong to your machine.
SEE ALSO
socket_connect(3), socket_listen(3), socket_create(3), socket_last_error(3), socket_strerror(3).
PHP Documentation Group SOCKET_BIND(3)