Anyone have an example of a simple shell script that solicits a (Y)es or (N)o response from the user. If the response is 'Y' display a message on the screen that thanks the user for the positive response. If the response is 'N' display a message that thanks the user for the negative response. If... (15 Replies)
Hi, I need help writing a unix script to change the time in the server automatically when it reaches a specified time.
Only on the 14th of april, when the time becomes midnight (00:00:00), I need the server to change the time automatically to 23:30:00 and start working on as usual with a... (2 Replies)
hi all
i am having a file(a fixed length file) of 28 bytes.The file has account number from 5th place to next 16 digits.
the file looks like below,
58331600563588885696ACXT5263
58331600563588885697ACXT5263
58331600563588885698ACXT5263
i want to write a script which will extract the... (8 Replies)
Here is the script I am trying to write along with my answer I wrote. Please help me understand why it doesn't work.
Create an executable script file called "newname" that will perform the followings:
1. Rename a file upon the user's request. If the file exists, prompt the user for... (1 Reply)
Hi,
I have written a script which converts a give hexdecimal value to binary value in perl. But now, the problem is I should read every bit of it ( if its 10101010, i should read the value in each position and if the value in that position is 1 i should print a string and should exit if its... (1 Reply)
hello all,
I have a script, used to search for the strings from the set of 5 similar pattern file from the log dir. So here it goes . The input parameter is a part of the file name. When during the script execution, the script should parse the input parameter to original file's with the same... (0 Replies)
Dear Madam/Sir
Who can help me with writing a script doing the following?
1- Read names of files (only files with special name format let say initially they have the same file name start like TT*)
2- Then create an empty files with the same names have been read in step one but with extension... (1 Reply)
i need some help in donig some actions on files in a library.
i want to get the n last files, and print to the screen their name, date, and how many times a specific string appears in each file..
how can i do this..?... (6 Replies)
:wall:
Can't seem to figure out how to fix this please help
its not starting over like I would like it to
When I enter in "Date" or "Time" nothing comes
Also if you can tell me the commands for the other 3 stuff that would be much appreciated
#!/bin/bash
clear
while ; do
echo... (8 Replies)
I am new for script writing. I have a file named as name.dat and contain numbers with different rows and columns. I want to sum numbers at one row with that of at another row; like row1 + row101 + row 201, with corresponding columns. Any one can help me to write a script for this operation.
... (1 Reply)
Discussion started by: kumnegert
1 Replies
LEARN ABOUT REDHAT
net::http::nb
Net::HTTP::NB(3) User Contributed Perl Documentation Net::HTTP::NB(3)NAME
Net::HTTP::NB - Non-blocking HTTP client
SYNOPSIS
use Net::HTTP::NB;
my $s = Net::HTTP::NB->new(Host => "www.perl.com) || die $@;
$s->write_request(GET => "/");
use IO::Select;
my $sel = IO::Select->new($s);
READ_HEADER: {
die "Header timeout" unless $sel->can_read(10);
my($code, $mess, %h) = $s->read_response_headers;
redo READ_HEADER unless $code;
}
while(1) {
die "Body timeout" unless $sel->can_read(10);
my $buf;
my $n = $s->read_entity_body($buf, 1024);
last unless $n;
print $buf;
}
DESCRIPTION
Same interface as "Net::HTTP" but it will never try multiple reads when the read_response_headers() or read_entity_body() methods are
invoked. This make it possible to multiplex multiple Net::HTTP::NB using select without risk blocking.
If read_response_headers() did not see enough data to complete the headers an empty list is returned.
If read_entity_body() did not see new entity data in its read the value -1 is returned.
SEE ALSO
Net::HTTP
COPYRIGHT
Copyright 2001 Gisle Aas.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
libwww-perl-5.65 2001-08-27 Net::HTTP::NB(3)