Search Results

Search: Posts Made By: Mr_47
2,079
Posted By MadeInGermany
In Solaris 10 you must use the Posix variants...
In Solaris 10 you must use the Posix variants /usr/xpg4/bin/grep and /usr/xpg4/bin/awk. The ones in /usr/bin/ are from old Unix SysV 4.0.
Especially /usr/bin/awk is a link to /usr/bin/oawk (already...
2,079
Posted By MadeInGermany
As I understand the requirement it should be ...
As I understand the requirement it should be
fgrep -vxf a.out b.out > c.out
No RE match, and full line match.
The difference is visible if b.out has a line
fa
2,004
Posted By Scrutinizer
You need -f to do this. /usr/xpg4/bin/grep has a...
You need -f to do this. /usr/xpg4/bin/grep has a -f option.

In your example there were also:
-rw-r--r-- 1 mailsrv mail 189438124 Nov 2 2012 mail.log.31102012
-rw------- 1 mailsrv ...
2,004
Posted By Scrutinizer
Try /usr/xpg4/bin/grep instead
Try /usr/xpg4/bin/grep instead
2,004
Posted By Scrutinizer
Have you tried something like: gzcat...
Have you tried something like:
gzcat mail.log.*.gz | cat - mail.log*[!g][!z] | grep -f a.out > c.out
4,027
Posted By Chubler_XL
You will probably need to write a perl script to...
You will probably need to write a perl script to convert the date to epoch time
like this (name it strepoch.pl):
#!/usr/bin/perl
my @months = ("JAN", "FEB", "MAR", "APR", "MAY",
"JUN","JUL",...
4,027
Posted By Klashxx
It's pretty straightforward to add the file...
It's pretty straightforward to add the file writting:
#!/usr/bin/python

import re
import sys
from datetime import datetime
import time
strptime = lambda date_string, format:...
4,027
Posted By Klashxx
I modified your file to make the test posible: ...
I modified your file to make the test posible:
# cat a.txt
Jan 9, 2013 23:59:59 PM com.sun.uwc.common.auth.IdentitySSOAuthFilter doFilter INFO login:220.255.2.108:null:login successful
Jan 9, 2013...
7,233
Posted By itkamaraj
$ sed 's/@.*\//\//' test user/ris1/INBOX ...
$ sed 's/@.*\//\//' test
user/ris1/INBOX
user/ris2/INBOX
user/ris3/INBOX
user/ris4/INBOX
user/str1/INBOX
user/str2/INBOX
user/tg4/INBOX
7,233
Posted By Chubler_XL
Try this: gzip -dc http.log.20110808.gz |...
Try this:

gzip -dc http.log.20110808.gz | nawk ' /@/ { sub("^.*] ",""); sub(" .*", ""); if(!($0 in E)) print; E[$0]} ' > uniqueemail.out
3,041
Posted By itkamaraj
please use tag, otherwise it is really hard to...
please use tag, otherwise it is really hard to read it

---------- Post updated at 01:41 PM ---------- Previous update was at 01:23 PM ----------

put the patterns inside a text file ( for...
3,041
Posted By itkamaraj
hmm... start from the basic unix commands and...
hmm... start from the basic unix commands and read about the control statements and some basic tutorials and examples.. ( just google it )
search this forum for "new to unix".. you see lot of...
3,041
Posted By itkamaraj
nawk -F"/" '{if($0!~/@/){print...
nawk -F"/" '{if($0!~/@/){print $1"/"$2"@newdomain.com/"$3}else{print $0}}' test01.out
3,041
Posted By yazu
Try (not tested I'm on windows now): sed '/@/!...
Try (not tested I'm on windows now):
sed '/@/! s|/INBOX|@newdomain.com/INBOX|'
4,129
Posted By Shell_Life
One way you can start is learning regular...
One way you can start is learning regular expressions.

Here is another way of solving your problem using 'sed':
sed '/@/d' Input_File
4,129
Posted By michaelrozar17
One way would be.. awk '!/@/ {print $2}'...
One way would be..
awk '!/@/ {print $2}' inputfile > outfile
7,233
Posted By ravi san
create shell script to extract unique information from one file to a new file
Dear Mr 47,

Please try this simple code for retrieving unique information.


gzip -d http.log.20110808.gz ;cut -d " " -f9 http.log.20110808 |uniq > http.log.20110808_updated
7,233
Posted By ahamed101
You can use zgrep also /user/ahamed>...
You can use zgrep also


/user/ahamed> zgrep -o "[^ ]*@[^ ]*" http.log.20110808.gz
igchung@abc.com
sastria9@abc.com
sastria9@abc.com
sastria9@abc.com
pntcdor1@abc.com
pntcdor1@abc.com...
7,233
Posted By yazu
zcat http.log.20110801.gz | nawk... OR gunzip...
zcat http.log.20110801.gz | nawk...
OR
gunzip -c http.log.20110801.gz | nawk...
OR
gzip -dc http.log.20110801.gz | nawk ...
7,233
Posted By yazu
Note: if file is gzipped as extension seems to...
Note: if file is gzipped as extension seems to imply you man need to pipe output of gzip -d to these solutions.
7,233
Posted By yazu
Try to use nawk instead of awk.
Try to use nawk instead of awk.
7,233
Posted By Chubler_XL
With grep/sort/uniq: grep -o "[^ ]*@[^ ]*"...
With grep/sort/uniq:
grep -o "[^ ]*@[^ ]*" http.log.20110808.gz | sort | uniq

With awk:
awk ' /@/ { sub("^.*] ",""); sub(" .*", ""); if(!($0 in E)) print; E[$0]} ' http.log.20110808.gz
...
1,399
Posted By Scott
Yes it is. It "cats" a file (a useless use of...
Yes it is. It "cats" a file (a useless use of cat), cuts (extracts) the second field assuming the file is comma-separated, then, for each sequence of non-unique records shows a count of how many...
92,846
Posted By Neo
User Guide: Posting in the Emergency Forum
Emergency UNIX and Linux Support !! Help Me! Forum (Request Urgent Help) (https://www.unix.com/emergency-unix-linux-support-help-me/)

README FIRST: How to Request Emergency or Urgent Help:


...
Showing results 1 to 24 of 24

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