Search Results

Search: Posts Made By: mrwatkin
3,387
Posted By mrwatkin
Yep. We're using Solaris, which has become a...
Yep. We're using Solaris, which has become a pain in the butt. There are a few modules out there that come default with many Linux distros, but not for Solaris. We use ksh most times. I'm not...
3,387
Posted By mrwatkin
Perl SSH without a perl module
I'm trying to create a perl script that will do 1 SSH session, but be able to write multiple commands to the session and receive multiple outputs. I know there are modules out there like...
1,819
Posted By mrwatkin
Nope. Not if I'm pulling the last entry in the...
Nope. Not if I'm pulling the last entry in the log like I'm tailing it. I want to compare that last entry to a previous timestamp of when I started a timer.

It appears that I still don't have a...
1,819
Posted By mrwatkin
Shouldn't it be: my $timeelapsed =...
Shouldn't it be:

my $timeelapsed = $logTimeStamp - $s;

That would mean the logTimeStamp was the higher number.
1,819
Posted By mrwatkin
I don't think I'm asking my question clearly...
I don't think I'm asking my question clearly enough.

use Time::HiRes 'gettimeofday';
use POSIX;

my $s = gettimeofday();
my $logFileLine = "05/12/2012 13:23:00 - Something just happened";
my...
1,819
Posted By mrwatkin
Turn given time into HiRes time.
So, I know how to get the current time of the day using Time::HiRes. I'd like to be able to create a specific time I can use. I'm thinking I can take a POSIX timestamp and use 0 for the...
1,454
Posted By mrwatkin
Success! You guys are awesome. Thanks.
Success! You guys are awesome. Thanks.
1,454
Posted By mrwatkin
I tried that and it still didn't work. Any other...
I tried that and it still didn't work. Any other suggestions?
1,454
Posted By mrwatkin
SSH full shell script in 1 line.
I'd like to ssh a piece of shell script code into a single ssh command.

As you all know, you could ssh something like this:

ssh user@host "ls -la"

and receive the output of that command...
1,992
Posted By mrwatkin
Unfortunately, my job wouldn't allow that. ...
Unfortunately, my job wouldn't allow that. Sorry, but thanks for your reply. If I had my way, I'd just use MIME::Lite and be done with it.

---------- Post updated at 12:57 PM ---------- Previous...
1,992
Posted By mrwatkin
MIME Type detection for Net::SMTP
I've spent a good two weeks on trying to figure out a proper way to get the mime type of a file. The "file" command on the Sparc machine I'm working on is an older version and does not support the...
2,317
Posted By mrwatkin
Yup, I checked the man pages and the version of...
Yup, I checked the man pages and the version of file I'm using on this Sparc machine only supports the -d, -c, -f, -h, -i, and -m flags. Sometimes, I'm a little limited to what I can use.
2,317
Posted By mrwatkin
Thanks for the info. Does it support any type of...
Thanks for the info. Does it support any type of formatting for when I'm using something like Net::SMTP? I'd like to make use of this for specifying if I'm using application/text, etc.
2,317
Posted By mrwatkin
Determine Content-Type
I am limited to using only libraries that come with the default install of ActivePerl. I'd like to be able to determine the content type of a file on the fly. I thought CGI.pm might do it, but it...
1,543
Posted By mrwatkin
perl ref to hash with refs in it (how to get what's being referenced).
I have a reference to a hash that contains some references. I was just wondering if there was a more simplistic Way of dereferencing the contained references without having to assign them to...
2,285
Posted By mrwatkin
I think you may be missing my problem. If I run...
I think you may be missing my problem. If I run my script with 1 arguments, $# is equal to 1. If I run this script again without arguments, during the same ssh session, $# is still 1. I'm trying...
2,285
Posted By mrwatkin
$1 stays set after sourcing shell script.
ok, so I have a shell script that can be called using the first argument ($1) or not. This argument is a word (Tim for example) and not an actual flag (-x for example). If I call the script with an...
2,504
Posted By mrwatkin
You, sir, are awesome. Thank you.
You, sir, are awesome. Thank you.
2,504
Posted By mrwatkin
symbol list reference
Can anyone direct me to a page that holds a list of perl's built in symbols?

Example:

$_ means blah
$? means blah2
$! means blah3
1,308
Posted By mrwatkin
Perl syntax that I don't understand.
I'm just trying to confirm that I understand someone's code correctly.

If someone has code that says:
$foo ||= mysub();

I'm assuming that it means if $foo is nothing or undef, then assign it...
1,209
Posted By mrwatkin
I tried it yesterday and it didn't work. Thanks...
I tried it yesterday and it didn't work. Thanks for the reply though. I appreciate it.
1,209
Posted By mrwatkin
Well, math-bigint is a core module and cannot be...
Well, math-bigint is a core module and cannot be upgraded without upgrading perl. We're not allowed to upgrade our perl version at this time.
1,209
Posted By mrwatkin
2 versions, 1 script (A tale of madness.)
So, I have a machine running solaris (x86) and it has two different versions of Math::BigInt installed on it. The older version is 1.77. The newer version is 1.87 (via activeperl). When I run my...
4,518
Posted By mrwatkin
Here's the solution.
So after some long research, I found that Math::BigInt::GMP is necessary to get authentication to go really fast. I'm using protocol => 2 in case anyone is wondering. So here's an answer for the...
1,502
Posted By mrwatkin
You could use a buffer, chomp until you find the...
You could use a buffer, chomp until you find the line with the 1000, then delimit by spaces or tabs (whatever the character is):

while($buffer = <MYFILE>)
{
chomp($buffer);
if('1000' eq...
Showing results 1 to 25 of 81

 
All times are GMT -4. The time now is 11:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy