Sponsored Content
Operating Systems HP-UX Unable to pass a space inside a variable shell scripting Post 302843589 by Kits on Wednesday 14th of August 2013 03:24:26 AM
Old 08-14-2013
Thanks Krishmaths Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to Pass variable to shell Script

Hi , i am beginner to Unix, I have one small script which execute java programme,it has java command input output structure . Right now i have given Input output structure manually that is on same directory, now how can i pass that by commandline #!/bin/sh java Classjava input.txt... (5 Replies)
Discussion started by: sam70
5 Replies

2. Shell Programming and Scripting

how to pass a variable to an update sql statement inside a loop

hi all, i am experiencing an error which i think an incorrect syntax for the where clause passing a variable was given. under is my code. sqlplus -s ${USERNAME}/${PASSWORD}@${SID} << END1 >> $LOGFILE whenever sqlerror exit set serveroutput on size 1000000 declare l_rc ... (0 Replies)
Discussion started by: ryukishin_17
0 Replies

3. Shell Programming and Scripting

nested double quota and white space inside variable

I have a question about nested double quotes. Any help is appreciated. Here are my commands on Mac OS. # string="Ethernet \"USB Ethernet\" \"Bluetooth DUN\" AirPort FireWire \"Bluetooth PAN\"" # echo $string Ethernet "USB Ethernet" "Bluetooth DUN" AirPort FireWire "Bluetooth PAN" #... (3 Replies)
Discussion started by: lindazhou
3 Replies

4. Shell Programming and Scripting

Not able to store command inside a shell variable, and run the variable

Hi, I am trying to do the following thing var='date' $var Above command substitutes date for and in turn runs the date command and i am getting the todays date value. I am trying to do the same thing as following, but facing some problems, unique_host_pro="sed -e ' /#/d'... (3 Replies)
Discussion started by: gvinayagam
3 Replies

5. Shell Programming and Scripting

Pass shell variable to gnuplot

Hi I am plotting a series of CDFs using gnuplot using plot "data" u 1:(1./x.) smooth cumulative I am doing this over many files and I need to tune the x value to the number of lines that meets a particular condition. Is it possible to get the line count from shell using cat file | grep... (7 Replies)
Discussion started by: jamie_123
7 Replies

6. Shell Programming and Scripting

unable to pass value to user prompt from calling shell script

This is my script structure main script calls configure script which needs to be run as a different user and the configure script calls my application installation script. the application instruction script prompts the user for a directory which I need to pass from my main or configure script. ... (4 Replies)
Discussion started by: cmastays
4 Replies

7. Shell Programming and Scripting

How to pass current year and month in FOR LOOP in UNIX shell scripting?

Hi Team, I have created a script and using FOR LOOP like this and it is working fine. for Month in 201212 201301 201302 201303 do echo "Starting the statistics gathering of $Month partitions " done But in my scripts the " Month " variable is hard-coded. Can you please any one... (3 Replies)
Discussion started by: shoan
3 Replies

8. Shell Programming and Scripting

Unable to pass shell script variable to awk command in same shell script

I have a shell script (.sh) and I want to pass a parameter value to the awk command but I am getting exception, please assist. diff=$1$2.diff id=$2 new=new_$diff echo "My id is $1" echo "I want to sync for user account $id" ##awk command I am using is as below cat $diff | awk... (2 Replies)
Discussion started by: Ashunayak
2 Replies

9. Shell Programming and Scripting

Unable to pass send command in shell script

I am trying to automate a testcase . I am installing some software and it waits for user input after displaying "Do you want to continue ? " I am trying to do this in shell scripting. #!/bin/bash #!/usr/bin/expect -f /usr/bin/expect << EOF spawn apt-get install openjdk-7-jdk expect "*Do you... (1 Reply)
Discussion started by: Abdul Navaz
1 Replies

10. Shell Programming and Scripting

Unable to pass value from .Shell script to .SQL file

Hi All, I am new to shell script. I am trying to pass value from .sh file to .sql file . But I am able to run the .sql file from .sh file with values in sql file. But I am unable to pass the values from .sh file. can some one please help to resolve this. here is my .sh file s1.sh ... (4 Replies)
Discussion started by: reddy298599
4 Replies
SOCKET_SET_OPTION(3)							 1						      SOCKET_SET_OPTION(3)

socket_set_option - Sets socket options for the socket

SYNOPSIS
bool socket_set_option (resource $socket, int $level, int $optname, mixed $optval) DESCRIPTION
The socket_set_option(3) function sets the option specified by the $optname parameter, at the specified protocol $level, to the value pointed to by the $optval parameter for the $socket. PARAMETERS
o $socket - A valid socket resource created with socket_create(3) or socket_accept(3). o $level - The $level parameter specifies the protocol level at which the option resides. For example, to retrieve options at the socket level, a $level parameter of SOL_SOCKET would be used. Other levels, such as TCP, can be used by specifying the protocol number of that level. Protocol numbers can be found by using the getprotobyname(3) function. o $optname - The available socket options are the same as those for the socket_get_option(3) function. o $optval - The option value. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 socket_set_option(3) example <?php $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); if (!is_resource($socket)) { echo 'Unable to create socket: '. socket_strerror(socket_last_error()) . PHP_EOL; } if (!socket_set_option($socket, SOL_SOCKET, SO_REUSEADDR, 1)) { echo 'Unable to set option on socket: '. socket_strerror(socket_last_error()) . PHP_EOL; } if (!socket_bind($socket, '127.0.0.1', 1223)) { echo 'Unable to bind socket: '. socket_strerror(socket_last_error()) . PHP_EOL; } $rval = socket_get_option($socket, SOL_SOCKET, SO_REUSEADDR); if ($rval === false) { echo 'Unable to get socket option: '. socket_strerror(socket_last_error()) . PHP_EOL; } else if ($rval !== 0) { echo 'SO_REUSEADDR is set on socket !' . PHP_EOL; } ?> PHP Documentation Group SOCKET_SET_OPTION(3)
All times are GMT -4. The time now is 05:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy