Hi
I was able to pass parameters to a shell script from the command line but now, I am trying to make the shell script to get those parameters/values from a file.
Please give me ideas how to do this or if you have an example or website that shows how to do this.
I tried searches but it... (2 Replies)
I have a file with userIDs, one per line no spaces. I have a script that accepts userIDs as a parameter and outputs information about them. What I have had to do in the past was to modify each line of the file with userIDs to call the script with the userID and pipe the output to a data file.
... (2 Replies)
Hi All,
I have a 2 files. File1 i am generating using an ETL tool, which is a comman seperated delimited file which contains country code & load date.
everytime, this country code will be updated from a table. It might be AB or BA & ld_date will be for which date we need to load the file.
... (7 Replies)
Hi ,
I Have following requirement:
DB2 Sql query to pass from a parameter file
for example, I would create a parameter file with (SELECT column 1, column 2 FROM Table name) then job would read it and create a file with the contents named table.txt
How to write/modify below ksh script to... (10 Replies)
I executed a oracle stored procedure using shell script. How can i get the OUT parameter of the procedure(CLOB) and write it in a file or XML in UNIX environment using shell script? (2 Replies)
Hi All,
I have written a shell script to compile an oracle R12 form and also a procedure is called from it. The procedure registers the form, function and creates a menu entry.
I took directory as a parameter. Code is as below:
#!/bin/ksh
echo... (3 Replies)
Hi,
I have an XML file like the following...
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ONDEMAND_JOB VERSION="5.1" LOCALE="en_US">
<IMPORT_JOBSET TC_CONNECTION_NAME="default" ENVIRONMENT="PRD" USERNAME="Administrator" PASSWORD="AdminPassword" CALENDAR="Main Monthly Calendar"... (2 Replies)
Hi,
I have an XML file like the following...
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ONDEMAND_JOB VERSION="5.1" LOCALE="en_US">
<IMPORT_JOBSET TC_CONNECTION_NAME="default" ENVIRONMENT="PRD" USERNAME="Administrator" PASSWORD="AdminPassword" CALENDAR="Main Monthly Calendar"... (3 Replies)
//file begin =====
//some code
task abcd_;
input x;
input y,z; //some comment
output w; //some comment
reg p;
integer q;
begin
//some code
end
endtask : abcd_
//some code
//file end =====
expected output from above... (1 Reply)
Discussion started by: rishifrnds
1 Replies
LEARN ABOUT PHP
stream_wrapper_register
STREAM_WRAPPER_REGISTER(3) 1 STREAM_WRAPPER_REGISTER(3)stream_wrapper_register - Register a URL wrapper implemented as a PHP classSYNOPSIS
bool stream_wrapper_register (string $protocol, string $classname, [int $flags])
DESCRIPTION
Allows you to implement your own protocol handlers and streams for use with all the other filesystem functions (such as fopen(3), fread(3)
etc.).
PARAMETERS
o $protocol
- The wrapper name to be registered.
o $classname
- The classname which implements the $protocol.
o $flags
- Should be set to STREAM_IS_URL if $protocol is a URL protocol. Default is 0, local stream.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
stream_wrapper_register(3) will return FALSE if the $protocol already has a handler.
CHANGELOG
+--------+------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+------------------------------+
| 5.2.4 | |
| | |
| | Added the $flags parameter. |
| | |
+--------+------------------------------+
EXAMPLES
Example #1
How to register a stream wrapper
<?php
$existed = in_array("var", stream_get_wrappers());
if ($existed) {
stream_wrapper_unregister("var");
}
stream_wrapper_register("var", "VariableStream");
$myvar = "";
$fp = fopen("var://myvar", "r+");
fwrite($fp, "line1
");
fwrite($fp, "line2
");
fwrite($fp, "line3
");
rewind($fp);
while (!feof($fp)) {
echo fgets($fp);
}
fclose($fp);
var_dump($myvar);
if ($existed) {
stream_wrapper_restore("var");
}
?>
The above example will output:
line1
line2
line3
string(18) "line1
line2
line3
"
SEE ALSO
The "streamWrapper" prototype class, "Example class registered as stream wrapper", stream_wrapper_unregister(3), stream_wrapper_restore(3),
stream_get_wrappers(3).
PHP Documentation Group STREAM_WRAPPER_REGISTER(3)