Hi...
I need a help in using the awk command or any other solution to avoid the usage of loops.
My question is :
I have a input like this :
where the 4th field i.e 14450 is a date field which will be passed to a converter which will automatically convert to the normal date format.
(eg : date_conv(14450) will give output 12/10/2009. )
I wouldn't trust any date conversion code that gave that as an output. Is it October 12 or December 10?
And what relation does 14450 have to either of those?
Quote:
Now i am looking for a solution which will get the output in the following manner.
o/p format :
Note '-' represents hyphen.
So in my output there will be only 6 fields like :
where field 6 = v(hexadecimal value of field6 ) - hexadecimal value of field7) - (field8*10) - field9
In My input field6=320 then the hexadecimal value will be 140
if field7=450 then the hexadecimal value will be 1C2.
I am sending a kill comand to kill a process inside a SH script but I don`t want the user to notice it so I donīt want the message "1222 killed" to appear.
I`ve tried to redirect the standard output to /dev/null 2>&1 and also tried to use "nohup" but none of them was succesfull.
Can anyone... (1 Reply)
I am trying to make a script that will replace backslashes in a file, but only if the occurance is a pathname. In the file, there are a lot of regular expressions as well, so I'm trying to preserve the integrity of those regular expressions, but convert Windows relative paths. I'm using bash and... (1 Reply)
Dear all,
Normally unix automatically record up to 500 the command lines whatever I put in. Does anyone knows how I can avoid this record, in another word, I dont want system remember what I typed in
thanks (2 Replies)
How can we avoid the use of system command inside awk program?
Is there any alternative way in awk programming for removing files, sorting files and to find the differences between two file without using a system command?
Eg:
system("rm tempfil006");
How to avoid the use of system in above... (0 Replies)
Hi,
I have 2 queries
1 .when I run some unix command, I am getting the output of "time" at std output (screen)
for eg
zegrep <pattern> *.v.gz
I almost found the reason but not sure, if the no of files matching *.v.gz is more then I am getting the time command output at the... (5 Replies)
I'm using the following command, but how can I avoid printing exponential value (highlighted):-
awk ' BEGIN { OFS=FS="|" } { if(NF>4) $10=int(((3.77*$11)/100 + $11)); } { print } ' infile
CR|20121022|105|GSM|N|SAN|00122|SAN|75082|6.03929e+06|5819880|5794769|25111... (7 Replies)
mkdir logs
mkdir: Failed to make directory "logs"; File existsTo avoid this error i use the -p argument so it creates a folder only if it is does not exists like you see below.
mkdir -p logs In the similar manner i wish to avoid this error with ln command
ln -s /tmp/myfolder var
ln: cannot... (4 Replies)
Hi,
Here is my command
print $2 was meant to select the second column however, it is getting substituted with the second argument that was passed to the script.
Can you please tell me how can I resolve this ? (6 Replies)
i have the following code:
APIDS=$(echo $(ps -ef | awk -v gpid="${gpid}" '$2 == gpid || $3 == gpid {print $2,$3}') | sed 's~ ~|~g')
AllProcs=$(ps -ef | awk -v allpids="${APIDS}" '$2 ~ allpids || $3 ~ allpids {print $0}' | sed '/^$/d')
it seems the above... (6 Replies)
Discussion started by: SkySmart
6 Replies
LEARN ABOUT DEBIAN
bogotune
BOGOTUNE(1) Bogofilter Reference Manual BOGOTUNE(1)NAME
bogotune - find optimum parameter settings for bogofilter
SYNOPSIS
bogotune [-v] [-c config] [-C] [-d dir] [-D] [-r value] [-T value] -n okfile [[-n] okfile [...]] -s spamfile [[-s] spamfile [...]]
[-M file]
bogotune [-h]
DESCRIPTION
Bogotune tries to find optimum parameter settings for bogofilter. It needs at least one set each of spam and non-spam messages. The
production wordlist is normally used, but it can be directed to read a different wordlist, or to build its own from half the supplied
messages.
In order to produce useful results, bogotune has minimum message count requirements. The wordlist it uses must have at least 2,000 spam and
2,000 non-spam in it and the message files must contain at least 500 spam and 500 non-spam messages. Also, the ratio of spam to non-spam
should be in the range 0.2 to 5. If you direct bogotune to build its own wordlist, it will use the half the input or 2000 messages
(whichever is larger) for the wordlist.
Message files may be in mbox, maildir, or MH folder or any combination. Msg-count files can also be used, but not mixed with other formats.
OPTIONS
The -h option prints the help message and exits.
The -v option increases the verbosity level. Level 1 displays the scan output in detail instead of using a progress meter.
The -c filename option tells bogofilter to read the config file named.
The -C option prevents bogotune from reading a configuration file.
The -d dir option specifies the directory for the database. See the ENVIRONMENT section for other directory setting options.
The -D option tells bogotune to build a wordlist in memory using the input messages. The messages are read and divided into two groups. The
first group is used to build a wordlist (in ram) and the second is used for tuning. To meet the minimum requirements of 2000 messages in
the wordlist and 500 messages for testing, when -D is used, there must be 2500 non-spam and 2500 spam in the input files. If there are
enough messages (more than 4000), they will be split evenly between wordlist and testing. Otherwise, they will be split proportionately.
The -n option tells bogotune that the following argument is a file (or folder) containing non-spam. Since version 1.0.3, multiple arguments
to the -n option can be given. All non-option arguments until the next -s option will be treated as though they had been preceded by -n
The -s option tells bogotune that the following argument is a file (or folder) containing spam. It can be repeated as often as necessary.
Since version 1.0.3, multiple arguments to the -s can be given. All non-option arguments until the next -n option will be treated as though
they had been preceded by -s.
The -r value option tells bogotune to use the following parameter as the robx value.
The -T value option tells bogotune to use the following parameter as fp target value.
The -M file option tells bogotune to convert the file to message count format. This format provides a sorted list of each message's unique
tokens, along with their ham and spam counts. Sorting hides the sense of the messages quite effectively, thus protecting privacy. The
message-count format allows bogotune and bogofilter to score messages quickly without needing the original token database.
ENVIRONMENT
Bogofilter uses a database directory, which can be set in the config file. If not set there, bogofilter will use the value of
BOGOFILTER_DIR. Both can be overridden by the -ddir option. If none of that is available, bogofilter will use directory $HOME/.bogofilter.
BUGS
Bogotune is not particularly robust when presented with garbage input.
AUTHOR
The bogofilter developer team.
For updates, see the bogofilter project page[1].
SEE ALSO bogofilter(1), bogolexer(1), bogoupgrade(1), bogoutil(1)NOTES
1. the bogofilter project page
http://bogofilter.sourceforge.net/
Bogofilter 03/15/2010 BOGOTUNE(1)