06-01-2009
Yeah I figured that out about five minutes after I posted. Thanks for replying!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Ok heres the situation.
I'm grepping for all running processes with the name system. but there are also processes running with the name systema. How do I just search for processes running just under the "system" user
Thanks in advance (1 Reply)
Discussion started by: fusion99
1 Replies
2. UNIX for Dummies Questions & Answers
Hello.
I have a dir of 1500+ dir. In these dirs is a file host, with a tag <x_tag>.
I need to :
1. grep for all dir that contain this host file that contain <x_tag>
2. print a list of these host files containing <x_tag>
is this better to egrep this? (5 Replies)
Discussion started by: t4st33@mac.com
5 Replies
3. Shell Programming and Scripting
I have a pattern::
xldn3176bap>arj SOCRATES_MAIN_LNX | grep " FA "
10/04/2007 21:01 10/04/2007 21:01 FA 1776752/1 1
I want the line above this line and the line below it too. Can anyone tell me how it can be done?
- iAm4Free (4 Replies)
Discussion started by: iAm4Free
4 Replies
4. Shell Programming and Scripting
I've got a file which I am reading line by line (using read line) into a variable.
I then want to do a grep on that line to check for something. I've tried a number of methods none of which seem to work.
I thought I had it with the code below but for some reason it doesn't like it and comes... (4 Replies)
Discussion started by: QueryMaster
4 Replies
5. Shell Programming and Scripting
I am having a heck of a time trying to write a script that will grep for multiple strings in a single file. I am really at my wits end here and I am hoping to get some feedback here.
Basic information:
OS: Solaris 9
Shell: KSH
Oracle Database server
I was trying to grep through a file... (5 Replies)
Discussion started by: thecoffeeguy
5 Replies
6. UNIX for Dummies Questions & Answers
I need help with extracting data from a large file ~900mb. Below is how the data looks like,
line number value
1001 10000
... ...
5001 50000
6001 60000
... ...
10001 100000
... ...
100001 ... (3 Replies)
Discussion started by: shabs1985
3 Replies
7. Shell Programming and Scripting
ok, apparently this is a very difficult question to answer based on my searches on google that came up fruitless.
what i want to do is grep through a file for words that match a specified string.
but the thing is, i keep getting all words in the file that have the string in them.
say for... (27 Replies)
Discussion started by: SkySmart
27 Replies
8. Shell Programming and Scripting
I've got this command that I've been using to find strings on the same line, say I'm doing a search for name:
find . -name "*" | xargs grep -i "Doe" | grep -i "John" > output.txt
This gives me every line in a file that has John and Doe in it. I'm looking to add a OR operator for the second... (5 Replies)
Discussion started by: Rally_Point
5 Replies
9. Shell Programming and Scripting
I have a list of fields that I want to check a file for, returning that field if it not found at all in the file. Is there a way to do a grep -lc and return the passed variable too rather then just the count?
I am doing some crappy work-around now but I was not sure how to regrep this for :0 so... (3 Replies)
Discussion started by: personalt
3 Replies
10. Shell Programming and Scripting
I have 3-column tab separated data that looks like the following:
act of+n-a-large+vn-tell-v 0.067427
act_com of+n+n-a-large-manufacturer-n 0.129922
act-act_com-com in+n-j+vn-pass-aux-restate-v 0.364499666667
com nmod+n-j+ns-invader-n 0.527521
act_com-com obj+n-a-j+vd-contribute-v 0.091413... (2 Replies)
Discussion started by: owwow14
2 Replies
LEARN ABOUT OSX
lwp::robotua
LWP::RobotUA(3) User Contributed Perl Documentation LWP::RobotUA(3)
NAME
LWP::RobotUA - a class for well-behaved Web robots
SYNOPSIS
use LWP::RobotUA;
my $ua = LWP::RobotUA->new('my-robot/0.1', 'me@foo.com');
$ua->delay(10); # be very nice -- max one hit every ten minutes!
...
# Then just use it just like a normal LWP::UserAgent:
my $response = $ua->get('http://whatever.int/...');
...
DESCRIPTION
This class implements a user agent that is suitable for robot applications. Robots should be nice to the servers they visit. They should
consult the /robots.txt file to ensure that they are welcomed and they should not make requests too frequently.
But before you consider writing a robot, take a look at <URL:http://www.robotstxt.org/>.
When you use a LWP::RobotUA object as your user agent, then you do not really have to think about these things yourself; "robots.txt" files
are automatically consulted and obeyed, the server isn't queried too rapidly, and so on. Just send requests as you do when you are using a
normal LWP::UserAgent object (using "$ua->get(...)", "$ua->head(...)", "$ua->request(...)", etc.), and this special agent will make sure
you are nice.
METHODS
The LWP::RobotUA is a sub-class of LWP::UserAgent and implements the same methods. In addition the following methods are provided:
$ua = LWP::RobotUA->new( %options )
$ua = LWP::RobotUA->new( $agent, $from )
$ua = LWP::RobotUA->new( $agent, $from, $rules )
The LWP::UserAgent options "agent" and "from" are mandatory. The options "delay", "use_sleep" and "rules" initialize attributes
private to the RobotUA. If "rules" are not provided, then "WWW::RobotRules" is instantiated providing an internal database of
robots.txt.
It is also possible to just pass the value of "agent", "from" and optionally "rules" as plain positional arguments.
$ua->delay
$ua->delay( $minutes )
Get/set the minimum delay between requests to the same server, in minutes. The default is 1 minute. Note that this number doesn't
have to be an integer; for example, this sets the delay to 10 seconds:
$ua->delay(10/60);
$ua->use_sleep
$ua->use_sleep( $boolean )
Get/set a value indicating whether the UA should sleep() if requests arrive too fast, defined as $ua->delay minutes not passed since
last request to the given server. The default is TRUE. If this value is FALSE then an internal SERVICE_UNAVAILABLE response will be
generated. It will have an Retry-After header that indicates when it is OK to send another request to this server.
$ua->rules
$ua->rules( $rules )
Set/get which WWW::RobotRules object to use.
$ua->no_visits( $netloc )
Returns the number of documents fetched from this server host. Yeah I know, this method should probably have been named num_visits() or
something like that. :-(
$ua->host_wait( $netloc )
Returns the number of seconds (from now) you must wait before you can make a new request to this host.
$ua->as_string
Returns a string that describes the state of the UA. Mainly useful for debugging.
SEE ALSO
LWP::UserAgent, WWW::RobotRules
COPYRIGHT
Copyright 1996-2004 Gisle Aas.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.16.2 2012-02-11 LWP::RobotUA(3)