Search Results

Search: Posts Made By: reggiej
8,060
Posted By reggiej
vi substitute
My question is how would I substitute for ceratain number of occurences in a line? If this is my input
rjohns BFSTDBS01 Standard Silver NPRO30DINCR 2 Client

Is it possible to change the first 3...
4,087
Posted By reggiej
In my haste I wrote it incorrectly. It should be ...
In my haste I wrote it incorrectly. It should be
split /,/, $tmpArr[$x]) [1,35];
4,087
Posted By reggiej
Just thought I'd revisit this cause I discovered...
Just thought I'd revisit this cause I discovered that you can get to a specific field by using a splice. If I want the 2nd and 36th field you can do

($field2,$field36) = (split /,/, $tmpArr[$x])...
46,689
Posted By reggiej
Cbkihong, thats exactly what I was looking for....
Cbkihong, thats exactly what I was looking for. Thanks.
46,689
Posted By reggiej
sort and uniq in perl
Does anyone have a quick and dirty way of performing a sort and uniq in perl?

How an array with data like:

this is bkupArr[0] BOLADVICE_VN

this is bkupArr[1] MLT6800PROD2A

this is...
1
ftp
1,461
Posted By reggiej
ftp
Is there away to do a an ftp so that last access date of a file being ftp'ed is preserved. I am looking for the equivalent of cp -p.
20,154
Posted By reggiej
Thanks for the reply. I added a print...
Thanks for the reply.

I added a print statement for $@ and shows blank "".

The program does print the expected output, but what I am trying to test is the alarm. I use open(DSMADMC, "dsmadmc...
20,154
Posted By reggiej
Perl alarm signal
I am trying to write a signal to exit when a process times out. What I have come up with from poking around the web is this.

#!/usr/bin/perl

eval {
local $SIG{ALRM} = sub { die "alarm...
9,996
Posted By reggiej
That way works Perderabo but I'm really trying to...
That way works Perderabo but I'm really trying to recall how to record repetitive keystrokes in vi.
9,996
Posted By reggiej
Thanks for the reply but what I am trying to...
Thanks for the reply but what I am trying to achieve is
12/01/05,Thu,adsmte,9,0,0
12/02/05,Fri,adsmte,12,0,0
12/03/05,Sat,adsmte,10,0,0
12/04/05,Sun,adsmte,11,0,0
12/05/05,Mon,adsmte,10,0,0...
9,996
Posted By reggiej
recording keystrokes in vi
What is the syntax for recording command in vi. If I want to repeat a command over and over.

My file is
12/01/05,,adsmte,9,0,0
12/02/05,,adsmte,12,0,0
12/03/05,,adsmte,10,0,0...
4,736
Posted By reggiej
try this uuencode $logfile logfile.txt | mailx -s...
try this uuencode $logfile logfile.txt | mailx -s "Alert" m@yahoo.com
7,330
Posted By reggiej
I added /^[a-zA-Z0-9\/\,]*$/ and it worked for...
I added /^[a-zA-Z0-9\/\,]*$/ and it worked for me.

I wasn't sure if your input was FWD/RWD or FWD/RWD,
1,479
Posted By reggiej
Just looking at the code it looks like your...
Just looking at the code it looks like your handle for input is directed for output. $INFILE = ">$HOME/bin/stem.in";
34,070
Posted By reggiej
Thank you for the reply. I am also trying to...
Thank you for the reply.

I am also trying to understand the sort statement { $$_[0] } sort { $$b[1] <=> $$a[1] . I understant what it does but what I am not familiar with is the $$.
34,070
Posted By reggiej
Thanks for the reply. It absolutely does what I...
Thanks for the reply. It absolutely does what I am looking for.
Now I need to understand it. My understanding of the map function is that it works like a foreach loop. Is that right?

Can you...
34,070
Posted By reggiej
perl - system command
Can this be done without using te system command? I have a directory with a large number of files in it, but I am interested in only the 8 most recent.

The directory looks like
-rw-rw-rw- 1...
14,118
Posted By reggiej
splitting on dot in perl
I am trying to split input that looks like
,2005-09-12 01:45:00.000000,2005-09-12 01:48:18.000000,

I want to split on the dot .

What I am using is ($ev_time,$rol)=split(/\./),$inputfile;
...
4,087
Posted By reggiej
Thanks guys. Jim I was looking for a perl...
Thanks guys.
Jim I was looking for a perl solution.
4,087
Posted By reggiej
split question perl
I am interested in 2 and 36th fields in this input file. I was wondering if there was a more efficeint way to do this.

($pt1,$bkup_name,$pt3,$pt4,$pt5,$pt6,$pt7,$pt8,$pt9,
...
20,029
Posted By reggiej
Thanks for the replys. I'll have much better...
Thanks for the replys. I'll have much better understanding of the importance of using locals.
20,029
Posted By reggiej
perl global variables
Can someone give me "the lecture" on why you shouldn't make all your varables global when programming in perl. I have been doing this but I have heard that it is not a good practice.
4,163
Posted By reggiej
Thanks I wasn't aware of these utilities.
Thanks I wasn't aware of these utilities.
4,163
Posted By reggiej
perl tr
I am attempting to have an upper case and lower case version of the input. I am using tr in perl, but I want to know if this can be done in a more efficient manner.
Here is my code:
sub getserver {...
4,868
Posted By reggiej
zazzybob, perl -pi -e '$_ = "" if ( $. == 1...
zazzybob,

perl -pi -e '$_ = "" if ( $. == 1 );' large_file
I am trying to convert the above perl command line you reference to a script.
I am not sure what the -pi does for the command line....
Showing results 1 to 25 of 28

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