Search Results

Search: Posts Made By: quine
Forum: Fedora 08-06-2009
1,972
Posted By quine
Try process monitoring. Write a script (you...
Try process monitoring. Write a script (you choose language) that monitors your process space (ps -ef etc) and reports to you when "unusual events" occur... You define "unusual" for yourself for...
13,241
Posted By quine
That's because your two foreach loops are nested....
That's because your two foreach loops are nested. So each file grabbed from the outer loop is paired with every file in the inner loop and then the next outer loop file gets grabbed and that paired...
3,995
Posted By quine
in Perl you could... 1. Read in the file...
in Perl you could...

1. Read in the file line by line -- assume stdin

while (<STDIN>) {
...
}

2. Inside that while() loop, split the line into an array...
@array = split(/\|/); # you...
4,417
Posted By quine
I believe the structure <DATA> only returns ONE...
I believe the structure <DATA> only returns ONE line at a time...

You need to put it in a loop...

$state = 0;
$line = <DATA>;
$state = 1 if $line =~ /#ddffff/i;
while (<DATA>){
...
8,719
Posted By quine
If you want to SPLIT a line into FIELDS as you...
If you want to SPLIT a line into FIELDS as you say you do in bash, then look up perl's split() built in subroutine... On the other hand, if what you really want is to test the characters from...
7,183
Posted By quine
Glad it helped. Now you'll know about named pipes...
Glad it helped. Now you'll know about named pipes from now on :-)
7,183
Posted By quine
In unix there is a special file type called a...
In unix there is a special file type called a "named pipe" (look it up). So you create one of these named pipes (before running your processes). Then you take the output of your BG process and...
Forum: Programming 08-19-2008
5,421
Posted By quine
I agree. I learned a lot more when I actually had...
I agree. I learned a lot more when I actually had something to do. Sometimes those ideas came from myself, more often something my employer needed. School provides just those sorts of exercises......
Forum: Programming 08-19-2008
9,373
Posted By quine
It's been a long time, but if I recall it works...
It's been a long time, but if I recall it works like this....

Each serial port has a port-buffer (in the old days this could be as little as 8 bytes) and you process buffer traffic 1 character at...
Forum: Programming 08-17-2008
5,421
Posted By quine
How this reminds me of me a long time ago... ...
How this reminds me of me a long time ago...

At the moment, JAVA is the center of the programming universe, so you might as well go for that. You can't go wrong being a good Java programmer. Then...
4,976
Posted By quine
Someone already mentioned this, but I'll...
Someone already mentioned this, but I'll reiterate... The way this is handled on my production systems is to require a "rename" to some other directory on the same file system. So you UPLOAD the file...
Forum: Solaris 08-11-2008
6,613
Posted By quine
Try "set pagesize 0" at the top of your sql...
Try "set pagesize 0" at the top of your sql script, and possibly you take out the slash between the two scripts. I think you only have to end the whole script with / then quit.
2,098
Posted By quine
Perl buffers output by default. Maybe when you...
Perl buffers output by default. Maybe when you execute from browser you never see the buffered output. Set $| = 1; (or $AUTOFLUSH = 1) and you will turn off buffering on the CURRENTLY SELECTED FILE...
21,433
Posted By quine
When you execute from your account there is an...
When you execute from your account there is an ENVIRONMENT. When you execute from cron there is no built-in environment and if you need anything like paths, etc. you have to specify it in your...
12,392
Posted By quine
Can you use perl? If so, you can build a mask for...
Can you use perl? If so, you can build a mask for each of the three fixed format records, then unpack() them and join() them using your delimiter (looks like a space, supposed to be comma in...
1,972
Posted By quine
This is something I've encountered on some unix...
This is something I've encountered on some unix systems and not others. What's happening is that a space is being interpreted as not only a field separator, but a record separator. Yet it doesn't...
1,944
Posted By quine
Have a look at the man page for egrep...
Have a look at the man page for egrep (extended-grep). That supports regular expressions. Then you could do something like:

ls -1 | egrep ?????(001|002|003...|010)*.L2

I've been away from...
6,176
Posted By quine
I'm pretty sure you can't shutdown the database...
I'm pretty sure you can't shutdown the database from inside SQL plus, and you certainly couldn't start it up! These commands are executed from the operating system, not sqlplus. You can certainly do...
Forum: UNIX and Linux Applications 07-29-2008
8,190
Posted By quine
Escape codes... Colors... Yes makes sense....
Escape codes... Colors...

Yes makes sense. Hadn't thought of that. I've got a little project of my own that requires getting rid of escapes like that (simple perl pattern). I wondered what they...
Forum: UNIX and Linux Applications 07-28-2008
8,190
Posted By quine
It's real DATA ANALYSIS! Why are you using...
It's real DATA ANALYSIS!

Why are you using "ls -l" if all you want is the names? Try ls -1.. That will simplify things for you... As for the special characters, get used to "od" Octal Dump.......
4,622
Posted By quine
1) Write addleadingzero() to handle an array and...
1) Write addleadingzero() to handle an array and pass all the values (except year) to it. Return the array, then use it, eg

my (@myarray) = ($dt[4], $dt[3], ... etc);
my $outfilename =...
2,469
Posted By quine
That's the difference between how browsers...
That's the difference between how browsers interpret "newlines" (they ignore them) and ordinary text output... I don't see where your program distinguishes console from browser output... But on the...
2,469
Posted By quine
When you do @raw_data = <DAT> the newlines are...
When you do @raw_data = <DAT> the newlines are being removed as the lines are split (automatically) into the array elements. So when you print the data you can't just dump @raw_data... Try something...
1,932
Posted By quine
You simply pre-pend the "time" command to your...
You simply pre-pend the "time" command to your script. When your script ends, the execution time, cpu time, etc will be printed to STDOUT...

> time yourscriptname

your script's output....
...
1,932
Posted By quine
Look at the "time" command
Look at the "time" command
Showing results 1 to 25 of 65

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