Search Results

Search: Posts Made By: hazno
8,246
Posted By hazno
? parameter in mysql query
I am debugging some code and came across ? in the WHERE cause in a mysql query.

Is this possible and what situations would this be used?


SELECT ip, count
FROM table
WHERE domain=?

...
Forum: UNIX and Linux Applications 04-06-2009
3,492
Posted By hazno
mysql query all entries which 'dont' match
I am trying to query a list of hosts and extract all entries which 'dont' match.

SELECT LOGS.host, GOODLIST.host FROM LOGS,db.GOODLIST WHERE (LOGS.host <> GOODLIST.host)When I use this query, it...
8,643
Posted By hazno
I'll answer my own question.
I'll answer my own question.
8,643
Posted By hazno
remove colons in MAC address in PERL
Thanks for the response. I forgot to add....in perl.
8,643
Posted By hazno
remove colons in MAC address
whats the simplest method to remove the colons from a mac address in PERL?

thanks & regards
2,369
Posted By hazno
There was an extra ' which thru up a syntax err. ...
There was an extra ' which thru up a syntax err. :-)

I removed it and it works a treat. Thanks.

Domo arigatou. Thank you.

How would I make it so, it checks 5 levels deep and if the fqdn...
2,369
Posted By hazno
re-arrange fqdn entries
How would I reverse a list of fqdn and comma delimited to 5 levels but keep a number at the end?

Input:

aa.bb.cc.dd.com,78

Output:

dd,cc,bb,aa,,78

thanks & regards
2,526
Posted By hazno
Calling C program from cron results in no output
I can call a C program from the shell and results are outputted as normal. The C program processes some files and spits out a .csv file.

If I scheduled it in cron, there is no output.

If their...
3,307
Posted By hazno
awesome thanks.
awesome thanks.
5,733
Posted By hazno
add the output of a query to a variable to be used in another query
I would like to use the result of a query in another query. How do I redirect/add the output to another variable?


$result = odbc_exec($connect, $query);
while ($row =...
3,307
Posted By hazno
Extract IP addresses
The only way I could extract the user names and 'from' IP addresses is to use a few temp files. Split up by 'Failed keyboard-interactive' and 'Failed password'.

Anyone have any idea to do this...
2,252
Posted By hazno
Dont worry about this. I took out the while loop...
Dont worry about this. I took out the while loop and its working as expected now.

thanks
2,252
Posted By hazno
List of IPs & database lookup
I am trying to feed a list of IP's to do lookups from a database. My script works only for the first IP but all subsequent IPs output as 'unknown'.


#!/usr/bin/php -q
<?
$ip =...
25,367
Posted By hazno
My first attempt... Check file size If...
My first attempt...

Check file size
If file reached file size
Append date to filename
Compress filename.$date
scp filename.$date to target server


#!/bin/bash
SIZE=`ls -la syslog.log |...
25,367
Posted By hazno
monitor size of file in realtime
How would one monitor the size of a file in realtime, then when it reaches a certain size (like 10megs), gzip, append timestamp to filename and scp to another box?

regards
Forum: UNIX and Linux Applications 03-10-2009
4,821
Posted By hazno
Hello, By day of the month, so I can run...
Hello,

By day of the month, so I can run searches on each individual 'day' table instead of the whole database. This is mysql. Creating a view sounds like a good idea and I will give that a...
Forum: UNIX and Linux Applications 03-09-2009
4,821
Posted By hazno
create 'day' tables based on timestamp in mysql
How would one go about creating 'day' tables based on the timestamp field.

I have some 'import' tables which contains data from various days and would like to spilt that data up into 'days'...
11,353
Posted By hazno
I tried but got the following: This...
I tried but got the following:



This code taken from here (http://pleac.sourceforge.net/pleac_perl/datesandtimes.html)

<CODE>
#-----------------------------
use Time::Local;
$TIME =...
11,353
Posted By hazno
Converting timestamps to UTC in bash
Hello,

I am trying to figure out a way to convert the timestamps in a dataset from one timezone (which has daylight savings) to UTC.

2009-02-25 23:57:22,000D60727B89,221.16.86.23,SYSTEM1What...
15,858
Posted By hazno
Thank you guys. That worked perfectly. ...
Thank you guys. That worked perfectly. Appreciate it.

regards,
15,858
Posted By hazno
convert date format to mysql date format in log file
I have a comma delimited log file which has the date as MM/DD/YY in the 2nd column, and HH:MM:SS in the 3rd column.

I need to change the date format to YYYY-MM-DD and merge it with the the time...
Showing results 1 to 21 of 21

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