If you have big input files, this might run a tiny bit faster (since it only saves the URL once per IP address) and might be a little bit prettier (lining up URL headings with the output assuming an 80 column output device and variable length URLs). It will also allow you to call your script with multiple input files and get a single report for the combined contents of all files you pass in...
This User Gave Thanks to Don Cragun For This Post:
howdy experts,
i am using 2 server- Solaris 5.9
i have tape device attached with 1 of my solaris server. But others not.
# modinfo|grep tape
152 13d43e4 1333c 33 1 st (SCSI tape Driver 1.231)
now i want to Backup DATA file and System File in Tape Drive.
How do I take data and... (3 Replies)
i try to install solaris OS in M4000 using OK prompts by boot net .
in my rules file i define the cpus like below
probe cpus
probe networks
networks 2 && cpus 8-10 && disksize c0t0d0 100000-292000 && disksize c0t1d0 100000-292000 && memsize 16384 && model SUNW,SPARC-Enterprise... (0 Replies)
All,
I am trying to figure out a script to run in windows that will allow me to match on First column in file1 to 8th Column in File2 then
Insert file1 column2 to file2 column4 then create a new file.
File1:
12345 Sam
12346 Bob
12347 Bill
File2:... (1 Reply)
awk -v nfiles="10"
{
.........................
............
}' $1 $2 $3 $4 $5 $6 $7 $8 $9 $10
up to9 inputs script is running fine but after that it is throwing error file not found though there is a file.
I used {$10} but no use. (1 Reply)
The scope of the shell/perl script is to read the input text file. Validate the expiry date of each certificate and send the mail to the user. The user takes action to add the new certificate to the storage file and user owns the responsibility to update the input text file with the new certificate... (5 Replies)
HI
I have file A.txt
_1A
_2A
_3A
_4A
I want define all as different variable.
$1A=_1A
$2B=_2A
$3C=_3A
$4D=_4A
Now i can use any variable in my script. (3 Replies)
Hi all ,
The FTP user defind in my passwd file has ! in the hash password field and i want to know way is that its usually either
MD5(Unix) hash or * can anyone explain to me i'm new for unix and want to learn
this how my passwd file looks :
... (2 Replies)
Hello,
I would like to modify an existing script of mine that uses a manually defined "MCVERSION" variable and make it define that variable instead based on this JSON file stored online:
https://s3.amazonaws.com/Minecraft.Download/versions/versions.json
Within that JSON, I 'm looking for... (4 Replies)
Cope sample1: test.sh
i=0
echo " Outside loop i = $i "
while
do
i=$(( $i + 1))
echo "Inside loop i = $i "
done
echo " Out of loop i is : $i "
When run output :
Outside loop i = 0
Inside loop i = 1
Inside loop i = 2
Inside loop i = 3
Inside loop i = 4
Inside loop i = 5
Inside... (8 Replies)
Discussion started by: Adarshreddy01
8 Replies
LEARN ABOUT PHP
stream_filter_prepend
STREAM_FILTER_PREPEND(3) 1 STREAM_FILTER_PREPEND(3)stream_filter_prepend - Attach a filter to a streamSYNOPSIS
resource stream_filter_prepend (resource $stream, string $filtername, [int $read_write], [mixed $params])
DESCRIPTION
Adds $filtername to the list of filters attached to $stream.
PARAMETERS
o $stream
- The target stream.
o $filtername
- The filter name.
o $read_write
- By default, stream_filter_prepend(3) will attach the filter to the read filter chain if the file was opened for reading (i.e.
File Mode: r, and/or +). The filter will also be attached to the write filter chain if the file was opened for writing (i.e. File
Mode: w, a, and/or +). STREAM_FILTER_READ, STREAM_FILTER_WRITE, and/or STREAM_FILTER_ALL can also be passed to the $read_write
parameter to override this behavior. See stream_filter_append(3) for an example of using this parameter.
o $params
- This filter will be added with the specified $params to the beginning of the list and will therefore be called first during
stream operations. To add a filter to the end of the list, use stream_filter_append(3).
RETURN VALUES
Returns a resource which can be used to refer to this filter instance during a call to stream_filter_remove(3).
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.1.0 | |
| | |
| | Prior to PHP 5.1.0, this function returns TRUE |
| | on success or FALSE on failure. |
| | |
+--------+---------------------------------------------------+
NOTES
Note
When using custom (user) filters
stream_filter_register(3) must be called first in order to register the desired user filter to $filtername.
Note
Stream data is read from resources (both local and remote) in chunks, with any unconsumed data kept in internal buffers. When a new
filter is prepended to a stream, data in the internal buffers, which has already been processed through other filters will not be
reprocessed through the new filter at that time. This differs from the behavior of stream_filter_append(3).
Note
When a filter is added for read and write, two instances of the filter are created. stream_filter_prepend(3) must be called twice
with STREAM_FILTER_READ and STREAM_FILTER_WRITE to get both filter resources.
SEE ALSO stream_filter_register(3), stream_filter_append(3).
PHP Documentation Group STREAM_FILTER_PREPEND(3)