8 More Discussions You Might Find Interesting
1. AIX
Hi 2 all,
i have had AIX 7.2
:/# /usr/IBMAHS/bin/apachectl -v
Server version: Apache/2.4.12 (Unix)
Server built: May 25 2015 04:58:27
:/#:/# /usr/IBMAHS/bin/apachectl -M
Loaded Modules:
core_module (static)
so_module (static)
http_module (static)
mpm_worker_module (static)
... (3 Replies)
Discussion started by: penchev
3 Replies
2. Shell Programming and Scripting
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
3. UNIX for Dummies Questions & Answers
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies
4. Shell Programming and Scripting
logs:
"/home/abc/public_html/index.php"
"/home/abc/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
how to use "cut" or "awk" or "sed" to get the following result:
abc
abc
xyz
xyz
xyz (8 Replies)
Discussion started by: timmywong
8 Replies
5. Shell Programming and Scripting
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Discussion started by: shis100
7 Replies
6. Shell Programming and Scripting
Dear friends, following is the output of a script from which I want to remove spaces and new-line characters.
Example:-
Line1 abcdefghijklmnopqrstuvwxyz
Line2 mnopqrstuvwxyzabcdefghijkl
Line3 opqrstuvwxyzabcdefdefg
Here in above example, at every starting line there is a “tab” &... (4 Replies)
Discussion started by: anushree.a
4 Replies
7. Windows & DOS: Issues & Discussions
Hi,
How can I execute Unix's ksh equivalent of "cut' and "awk" in Windows XP?
For example, I want to execute ksh commands from Windows command prompt. Is there a place I can download "cut.exe" and "awk.exe" ?
Thanks in advance (4 Replies)
Discussion started by: ihot
4 Replies
8. UNIX for Dummies Questions & Answers
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies
Scan(3pm) User Contributed Perl Documentation Scan(3pm)
NAME
File::Scan - Perl extension for Scanning files for Viruses
SYNOPSIS
use File::Scan;
$fs = File::Scan->new([, OPTION ...]);
$fs->set_callback(
sub {
my $filename = shift;
my $bytes = shift;
...
return("Callback Value");
}
);
$fs->scan([FILE]);
if(my $e = $fs->error) { print "$e
"; }
if(my $c = $fs->skipped) { print "file skipped ($c)
"; }
if($fs->suspicious) { print "suspicious file
"; }
if(my $res = $fs->callback) { print "$res
"; }
DESCRIPTION
This module is designed to allows users to scan files for known viruses. The purpose is to provide a perl module to make plataform
independent virus scanners.
METHODS
new([, OPTION ...])
This method create a new File::Scan object. The following keys are available:
callback => 'subroutine reference'
if the item is set then use a callback subroutine reference to provide extra information and functionalities. The callback
subroutine have two arguments: filename and first 1024 bytes read from the file. This only work for binary files.
extension => 'string'
add the specified extension to the infected file
move => 'directory'
move the infected file to the specified directory
copy => 'directory'
copy the infected file to the specified directory
mkdir => octal_number
if the value is set to octal number then make the specified directories (example: mkdir => 0755).
delete => 0 or 1
if the value is set to 1 delete the infected file
max_txt_size => 'size in kbytes'
scan only the text file if the file size is less then max_txt_size. The default value is 5120 kbytes. Set to 0 for no limit.
max_bin_size => 'size in kbytes'
scan only the binary file if the file size is less then max_bin_size. The default value is 10240 kbytes. Set to 0 for no limit.
scan([FILE])
This method scan a file for viruses and return the name of virus if a virus is found.
set_callback([SUBREF])
This method is another way to install a callback subroutine reference. Take a look in callback kay.
skipped()
This method return a code number if the file was skipped and 0 if not. The following skipped codes are available:
0 file not skipped
1 file is not vulnerable
2 file has zero size
3 the size of file is small
4 the text file size is greater that the 'max_txt_size' argument
5 the binary file size is greater that the 'max_bin_size' argument
suspicious()
This method return 1 if the file is suspicious and 0 if not.
callback()
This method return the result from the callback subroutine.
error()
This method return a error message if a error happens.
AUTHOR
Henrique Dias <hdias@aesbuc.pt>
CREDITS
Thanks to Rui de Castro, Sergio Castro, Ricardo Oliveira, Antonio Campelo, Branca Silveira, Helena Gomes and Anita Afonso for the help.
Thanks to Fernando Martins for the personal collection of viruses.
SEE ALSO
perl(1).
perl v5.10.0 2009-07-19 Scan(3pm)