05-18-2008
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi all
by using cat /etc/passwd
I've got these output.
ajh1ect:x:839:501:Anthony:/home/ajh1ect:/bin/bash
mjb1ect:x:840:501:Michael:/home/mjb1ect:/bin/bash
mv3ect:x:841:501:Marian:/home/mv3ect:/bin/bash
now I want to see just the user ID and group ID.
so what is the code will be with... (2 Replies)
Discussion started by: nokia1100
2 Replies
2. Shell Programming and Scripting
I met a problem in using grep -P.
There is a text file, temp.txt, whose content is:
dddd
abc
I ran the command:
grep -P "\s*abc" temp.txt
The result I expected is:
abc
But, the actual result is:
dddd
abc
Could anyone tell me what is wrong?
Thanks. (2 Replies)
Discussion started by: pankai
2 Replies
3. Shell Programming and Scripting
Can someone help me in understanding when to use SED, AWK and GREP (3 Replies)
Discussion started by: kn.naresh
3 Replies
4. UNIX for Dummies Questions & Answers
I have two .txt files one called good.txt and the other one is called bad.txt. Both contain email addresses in the following format:
john@john.com
bob@bob.com
sarah@sarah.com
Basically, I want to scrub good.txt against bad.txt and save the resulting output in scrubbed.txt meaning that if... (2 Replies)
Discussion started by: holyearth
2 Replies
5. UNIX for Dummies Questions & Answers
------------------------------------------------------------------
Ex of Warning messgae,(Many similar lines occure for Both Test and Test1)
-WARNING:Below Field not implemented in file File name: /home/test/
new/file1, msg buffer is:
:Test:000948
... (1 Reply)
Discussion started by: prsam
1 Replies
6. Shell Programming and Scripting
Hi All,
I have a huge file, I need to two things from this file. I need to know the IP address or the hostname and second thing is the date&time.
The file looks like this and I need to get my data from this...
Trying...
Connected to 204.109.172.117.
Escape character is '^]'.
Fri... (4 Replies)
Discussion started by: samnyc
4 Replies
7. Shell Programming and Scripting
thanks for your reply.
but i'm not quite sure what your code is doing.
i may be using it wrong but i'm not getting what i'm supposed to get.
could you please elaborate?
thanks again, (6 Replies)
Discussion started by: kratos.
6 Replies
8. UNIX for Dummies Questions & Answers
Thread1 {
x = 2
y = 10485
}
Thread2 {
x = 16
y = 1048
}
Thread3 {
x = 1
y = 1049
}
Thread4 {
x = 4
y = 1047
z = 500
}
Suppose the above is a piece of code. I need to automate and verify that the value of x under Thread1's 2.
There are several... (3 Replies)
Discussion started by: foxtron
3 Replies
9. Shell Programming and Scripting
Hi everyone,
I've got a problem with converting C comments ( /* */ ) into C++ style ( // ) in some source file with sed. So far I've dealt with comments on one line, but I don't know how to convert when it is over multiple lines ...
So I already have something like this:
comments.sed
... (8 Replies)
Discussion started by: kolage
8 Replies
LEARN ABOUT REDHAT
http::request
HTTP::Request(3) User Contributed Perl Documentation HTTP::Request(3)
NAME
HTTP::Request - Class encapsulating HTTP Requests
SYNOPSIS
require HTTP::Request;
$request = HTTP::Request->new(GET => 'http://www.oslo.net/');
DESCRIPTION
"HTTP::Request" is a class encapsulating HTTP style requests, consisting of a request line, some headers, and some (potentially empty) con-
tent. Note that the LWP library also uses this HTTP style requests for non-HTTP protocols.
Instances of this class are usually passed to the "request()" method of an "LWP::UserAgent" object:
$ua = LWP::UserAgent->new;
$request = HTTP::Request->new(GET => 'http://www.oslo.net/');
$response = $ua->request($request);
"HTTP::Request" is a subclass of "HTTP::Message" and therefore inherits its methods. The inherited methods most often used are header(),
push_header(), remove_header(), and content(). See HTTP::Message for details.
The following additional methods are available:
$r = HTTP::Request->new($method, $uri)
$r = HTTP::Request->new($method, $uri, $header)
$r = HTTP::Request->new($method, $uri, $header, $content)
Constructs a new "HTTP::Request" object describing a request on the object $uri using method $method. The $uri argument can be either
a string, or a reference to a "URI" object. The optional $header argument should be a reference to an "HTTP::Headers" object. The
optional $content argument should be a string.
$r->method([$val])
$r->uri([$val])
These methods provide public access to the attributes containing respectively the method of the request and the URI object of the
request.
If an argument is given the attribute is given that as its new value. If no argument is given the value is not touched. In either case
the previous value is returned.
The method() method argument should be a string.
The uri() method accept both a reference to a URI object and a string as its argument. If a string is given, then it should be
parseable as an absolute URI.
$r->as_string()
Method returning a textual representation of the request. Mainly useful for debugging purposes. It takes no arguments.
SEE ALSO
HTTP::Headers, HTTP::Message, HTTP::Request::Common
COPYRIGHT
Copyright 1995-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-11-15 HTTP::Request(3)