12-20-2011
Hi CarloM,
Finally! Yeah, thank you so much... I hope I can also help soon
br,
rymnd_12345
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I apologize for the simple question but can someone please help me with how to evaluate a number?
I will be reading in a file and if a number is >= 100000000, I will do something, if not, I will exit the if statement.
Thanks in advance (1 Reply)
Discussion started by: hedrict
1 Replies
2. UNIX for Advanced & Expert Users
Does anyone know any tools or how to really get something out of a core file.
I can use strings and look for certain things like out of memory.
I am trying to use adb but I can't make heads or tails from it. I guess it is my lack of know how with the adb/mdb debugger.
anything would... (3 Replies)
Discussion started by: Gary Dunn
3 Replies
3. UNIX for Dummies Questions & Answers
Hi
I have a script in which I have several variables
var1
var2
var3
var4
etc......
and
field1
field2
field3
field4
etc.......
The script similar to this: (6 Replies)
Discussion started by: Bab00shka
6 Replies
4. UNIX for Dummies Questions & Answers
Hi all,
I ve a script like....
TBL=employee
sql=`cat abhi.sql` \\ abhi.sql contains ------- select a from $TBL
echo $TBL
echo $sql
SQL=`echo $sql`
echo $SQL
now i want SQL as select a from employee
and as select a from $TBL
How can I achieve this?
Help appriciated (3 Replies)
Discussion started by: abzi
3 Replies
5. Shell Programming and Scripting
I have a user defined configuration file, which could contain the following type of entries:
directory_001=/a/directory/structure
pattern_001=fred*
pattern_002=*
I have a script which reads the file generically which will loop round
loop 1
genvar=”directory”
iteration=”001”
... (11 Replies)
Discussion started by: Bab00shka
11 Replies
6. UNIX for Dummies Questions & Answers
how do i evaluate the value of date
if ( $(date +%m) > 8 ) then
FY_STAMP=FY$(echo $(($(date +%Y) + 1)) | cut -c3-4)
else
FY_STAMP=FY$(date +%y)
fi
i want this to make the FY_STAMP increment by 1 if the month is september and up. but cant seem to make it work (3 Replies)
Discussion started by: rsf01
3 Replies
7. Shell Programming and Scripting
How can I evaluate a decimal value in an if statement?
echo "Enter limit:"
read limit (enter a decmal value, ie: 2.5)
decimallimit=`echo $limit+0|bc|quit`
echo $decimallimit
if
then
echo $decimallimit
else
echo "failed"
fi (4 Replies)
Discussion started by: larrys721
4 Replies
8. Shell Programming and Scripting
I have the following in my makefile:
RESULT=`../${TOOLS_ROOT_PATH}/ext_tools.sh 11`; \
set $$RESULT > tMp; \
rm tMp; \
if ; then \
echo copying external-local tool: $< \($$*\); \
mkdir -p ${EXTERNAL_LOCAL_BIN_DIR}/$<; \
cp -f... (4 Replies)
Discussion started by: jake_ryan
4 Replies
9. Shell Programming and Scripting
Hi all,
Thanks in advance for your time.
I have a data file like this:
1 7.465753425
2 8.980821918
1 1.717808219
1 6.550684932
0 5.432876712
I wish to write a bash script to check both columns and output a 1 if col1==1 AND col2<3. Otherwise I want to output a 0. In the above... (5 Replies)
Discussion started by: jem8271
5 Replies
10. Shell Programming and Scripting
Does anyone know of a way to force a variable name held in another variable to return the value of the first variable? Best if I give an example, that does not work:
/usr/local/bin >cat mike.sh
NUM1ref=16
NUM2ref=32
echo "=============="
for VAR in NUM1 NUM2
do
XXXX=${VAR}ref
echo $XXXX... (4 Replies)
Discussion started by: mikejordan
4 Replies
LEARN ABOUT MOJAVE
lwp::robotua5.18
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.18.2 2012-02-11 LWP::RobotUA(3)