Search Results

Search: Posts Made By: ramirez987
1,519
Posted By ramirez987
As I said, the file works perfectly and there is...
As I said, the file works perfectly and there is no need to change it at this point. The command make a mess.
1,519
Posted By ramirez987
Unfortunatelly it doesn't work. I am getting some...
Unfortunatelly it doesn't work. I am getting some errors from perl file. Normally the file works fine.
1,519
Posted By ramirez987
Hi, I didn't use any code tags, since there...
Hi,

I didn't use any code tags, since there is no code or any data fragment in my post.
Yes, I am sure that this file is in all directories. And I know that it isn't very logical.
1,519
Posted By ramirez987
Executing perl files in many directories.
Good morning!

I need your help again.

I have some perl file. This file, to work, needs to be executed in appropriate directory, e.g. /mnt/disck/new files/abc/003

I need a shell script...
5,015
Posted By ramirez987
Well... I have no idea. It is working perfectly...
Well... I have no idea. It is working perfectly fine with the few lines above, but when I try to analyze full log file, there is no result.
5,015
Posted By ramirez987
Yes, but it doesn't work on other log file. It...
Yes, but it doesn't work on other log file.
It can look like this:

Sep 11 12:51:18 servername postfix/qmgr[18292]: 61F981C3A39: from=<ramirez987@example.com>, size=490403, nrcpt=1 (queue...
5,015
Posted By ramirez987
Unfortunatelly it is still not working. ...
Unfortunatelly it is still not working.
#!/bin/bash
DIR=/usr/src/count_test3
FILES=$DIR/*
for i in $FILES
do

sed -n "s/^.*from=<\([^@]*\)@example.com.*/\1/p" $i | sort | uniq -c...
5,015
Posted By ramirez987
Hi, There is no permanent place in which...
Hi,

There is no permanent place in which the address appeares, so it is not about "second occurrence". I just want to list all lolgins between the strings: "from=<" and "@example.com>"
5,015
Posted By ramirez987
I have another problem. I would like this...
I have another problem.

I would like this script to look for "from=<" and "@example.com>" and count logins between theese two phrases. E.g.:


Something somethingso from=<abc@xgx.com>...
5,015
Posted By ramirez987
Not really. If I make a copy of the log file in...
Not really. If I make a copy of the log file in the directory and run:
#!/bin/bash
DIR=/usr/src/count_test
FILES=$DIR/*
for i in $FILES
do
sed -n "s/.*LOGIN.*user=\([^,]*\),.*/\1/p" $FILES...
5,015
Posted By ramirez987
It is printing data from file, instead of...
It is printing data from file, instead of counting it.
5,015
Posted By ramirez987
Thanks, but I was thinking more about some loop: ...
Thanks, but I was thinking more about some loop:

#!/bin/bash
DIR=/usr/src/count_test
FILES=$DIR/*
for i in $FILES
do
sed -n "s/.*user=\([^,]*\),.*/\1/p" $FILES | sort -u $i
done

...
5,015
Posted By ramirez987
Thank you for help. anbu23, your solution...
Thank you for help.

anbu23, your solution is working, but what if I had many files in this directory and I want to do this for all of them? Lets say that I am trying to find out how many users...
5,015
Posted By ramirez987
Unique entries in multiple files
Hello,

I have a directory with a log files(many of them). Lines look like this:

Sep 1 00:05:05 server9 pop3d-ssl: LOGIN, user=abc@example.com, ip=[xxx], port=[63030]
Sep 1 00:05:05 server9...
Showing results 1 to 14 of 14

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