Search Results

Search: Posts Made By: r4v3n
Forum: UNIX and Linux Applications 07-02-2012
3,385
Posted By r4v3n
Help with freetds
Hi all,

I have an MS-Sql 2008 server. I need to perform a bulk insert of data (over 1 million records every hour) from an Ubuntu box. Doing this in python using pymssql takes about 30 seconds for...
7,198
Posted By r4v3n
Thanks Jean. This code worked : awk...
Thanks Jean.

This code worked :

awk --posix '/^http:\/\/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}(:[0-9]{1,5})?\// { print $0 }' filenameApologies for not RTFM properly :o
7,198
Posted By r4v3n
Hi A!, For some reason, your code doesn't...
Hi A!,

For some reason, your code doesn't give me any output on my machine. I'm running Ubuntu 10.04 with GNU Awk 3.1.6 :confused:
7,198
Posted By r4v3n
Thanks for the reply. The code doesn't work...
Thanks for the reply. The code doesn't work properly:

http://12345.678910.11121314.com/howaboutme

That is technically not an IP [ valid or not ], but your script accepts it.
7,198
Posted By r4v3n
awk equivalent of regex
Hi all,

Can someone tell me what's the (g)awk equal of this simple regex to find ip addresses in urls:

egrep "^http://[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}(:[0-9]{1,5})?/"Input:...
1,228
Posted By r4v3n
Thank you both. Both solutions worked, but...
Thank you both.

Both solutions worked, but am going with balajesuri's code because I understood his explanation :)
1,228
Posted By r4v3n
Help Moving lines
Hi,

I tried going through the existing threads, but couldn't find a solution to my problem. My input file is:


199.15.2.7|gxi.wxxx.com/|(Mozilla/4.0)|
ASCII text|950604ad05...
1,569
Posted By r4v3n
Printing highest value from a list
Hi all,

I'm trying to get the item with the maximum value, and was wondering if someone can help me with it.

Heres my input file:

apples 15
books 15
books 17
pens 12
pens 15
umbrella...
2,370
Posted By r4v3n
Because a.com has crossed its time to live of 3...
Because a.com has crossed its time to live of 3 days. In the original master list the entry is:

a.com 19

and today is the 23rd. The difference is 4 days which is greater than the TTL of 3 days....
2,370
Posted By r4v3n
Doesn't work. This is what I get in the current...
Doesn't work. This is what I get in the current master file:

a.com 19
b.com 17
c.com 21
d.com 21
e.com 23
f.com 23

But it should be:

b.com 23
c.com 21
d.com 21
e.com 23
f.com 23
2,370
Posted By r4v3n
Calculating expiry date using date,sed,grep
Hi,

I would greatly appreciate it if someone can help me with my problem.

I have a crawler which collects spam URLs everyday & this data needs to be published in a blacklist.

Here's the...
2,326
Posted By r4v3n
Thanks rdcwayx. Your script works better than...
Thanks rdcwayx. Your script works better than Ahamed's. Can you oh please explain your code. :o
2,326
Posted By r4v3n
Hi peasant, Thanks for the reply, but I...
Hi peasant,

Thanks for the reply, but I won't know the URL before hand. So I wouldn't be able to hard code it in the code.
2,326
Posted By r4v3n
Thanks....that did the trick. Can you explain the...
Thanks....that did the trick. Can you explain the code if possible please ?

thanks in advance
2,326
Posted By r4v3n
Hi ahamed, Thanks for the reply. This works,...
Hi ahamed,

Thanks for the reply. This works, but only partially.

If i use this code on this set of URLs:

http://google.com/dogs/1.exe
http://google.com/cats/2.exe...
2,326
Posted By r4v3n
Help with url filtering
Hi,

Here's my input file:


http://google.com/1.exe
http://google.com/2.exe
http://google.com/3.exe
http://rediff.jp/sample.zip
http://yahoo.com/1.exe


And here's what my output file...
10,293
Posted By r4v3n
Thanks for the reply Ken. Pinging the...
Thanks for the reply Ken.

Pinging the machine was one of the first solutions I thought of, but unfortunately when the VM goes down, ping would just hang. It would not throw any errors I could...
10,293
Posted By r4v3n
Help with Vmrun in Vmware
Hi,

I've set up Windows XP virtual machines on an Ubuntu host to perform certain automated tasks. I copy files from the Ubuntu machine over to the XP machines using vmrun, execute the files, and...
2,629
Posted By r4v3n
Beautiful. There's always something new to learn....
Beautiful. There's always something new to learn. Thanks a ton Alister

---------- Post updated at 11:32 PM ---------- Previous update was at 11:27 PM ----------

Just out of curiosity....How do...
2,629
Posted By r4v3n
Help on grep in a do while loop
So this is what I'm trying to do:

I have a file called registry.txt which has a list of registry entries I want to search for.

I have another file called inctrl.txt on which I want to perform...
8,786
Posted By r4v3n
Works fine in bash like this: sort file1...
Works fine in bash like this:

sort file1 file2 | uniq -u
2,434
Posted By r4v3n
After hours of trying i managed to find a very...
After hours of trying i managed to find a very crude way of doing this. Posting it so someone else might find it useful, or correct my script.

find /media/perl/bin/Malco -mindepth 2 -iname "*"...
2,661
Posted By r4v3n
Try this: echo AmericanDollar,...
Try this:

echo AmericanDollar, AustralianDollar, Singapore1Dollar | sed -r "s/([a-zA-Z]Dollar)/Pound/g"
2,434
Posted By r4v3n
Help with moving files with same names from subdirectories?
I was wondering if someone could help me with this:

I have multiple directories and subdirectories with files in them. I need to move all files from all directories and subdirectories into one...
10,833
Posted By r4v3n
I'm a newbie at this and i'm sure someone can...
I'm a newbie at this and i'm sure someone can write a better script than mine. But this works using sed captures:
sed -r "s/(^.*),([0-9][0-9])/\2 \1 /" input.txt | sed "s/,/./"
Showing results 1 to 25 of 30

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