02-22-2008
link removed might get you started
Last edited by Perderabo; 02-22-2008 at 09:24 PM..
Reason: Remove link
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
munt=`date '+%m` will isolate the month in digit form 02 = Feb
Trying to get the same out of perl just cant see it
$stimx = localtime($^T);
print ((split/ /,$stimx)); (4 Replies)
Discussion started by: popeye
4 Replies
2. Shell Programming and Scripting
Hi,
I have file: data.log.1
### s1
main.build.3495
main.build.199
main.build.3408
###s2
main.build.3495
main.build.3408
main.build.199
I want to read this file and store in two arrays in Perl.
I have following command, which is working fine on command prompt.
perl -n -e... (1 Reply)
Discussion started by: ashvini
1 Replies
3. Shell Programming and Scripting
Below is my perl script:
#!/usr/bin/perl
open(FILE,"$ARGV") or die "$!";
@DATA = <FILE>;
close FILE;
$join = join("",@DATA);
@array = split( ">",$join);
for($i=0;$i<=scalar(@array);$i++){
system ("/home/bin/./program_name_count_length MULTI_sequence_DATA_FILE -d... (5 Replies)
Discussion started by: patrick87
5 Replies
4. Shell Programming and Scripting
Hello All,
I am trying to come up with a shell script to count a specific word in a logfile on each day of this month, last month and the month before. I need to produce this report and email it to customer.
Any ideas would be appreciated! (5 Replies)
Discussion started by: pnara2
5 Replies
5. Shell Programming and Scripting
In PERL script
I have few files named theme1.htm,theme2.htm,theme3.htm and so on.
now I need to write perl code to split the the filename and store only that particular digit.
Example
--------------
filename is theme1.htm
output should be 1
another example
---------------... (5 Replies)
Discussion started by: giridhar276
5 Replies
6. Shell Programming and Scripting
I had a text file(comma seperated values) which contains as below
196237,ram,25-May-06,ram.kiran@xyz.com,204183,Pavan,4-Jun-07,Pavan.Desai@xyz.com,237107,ram Chandra,15-Mar-10,ram.krishna@xyz.com ... (3 Replies)
Discussion started by: giridhar276
3 Replies
7. Shell Programming and Scripting
I am writing the code in perl.
I have an array in perl and each variable in the array contains the data in the below format
Now I need to check the below variable w.r.t system month I need to store the date and time(Tue Aug 7 03:54:12 2012) from the below data into file if contains only 'Aug'... (5 Replies)
Discussion started by: giridhar276
5 Replies
8. Shell Programming and Scripting
Hello,
i`m looking for some way to add to some date an partial number of months, for example to 2015y 02m 27d + 2,54m
i need to write this script in php or bash or sh or mysql or perl in normal time o unix time
i`m asking or there are any simple way to add partial number of month to some... (14 Replies)
Discussion started by: bacarrdy
14 Replies
9. UNIX for Beginners Questions & Answers
Hi,
I have a directory in Unix and there are folders available in the directory.
Files are created on different month and now i have a requirement to calculate size of the folder on month basis.
Is there any Unix command to check this please??
Thanks (6 Replies)
Discussion started by: Nivas
6 Replies
10. Shell Programming and Scripting
I have a perl script which splits a large file into chunks.The script is given below
use strict;
use warnings;
open (FH, "<monolingual.txt") or die "Could not open source file. $!";
my $i = 0;
while (1) {
my $chunk;
print "process part $i\n";
open(OUT, ">part$i.log") or die "Could... (4 Replies)
Discussion started by: gimley
4 Replies
LEARN ABOUT DEBIAN
chewmail
CHEWMAIL(1) User Contributed Perl Documentation CHEWMAIL(1)
NAME
chewmail - mail archiver
SYNOPSIS
chewmail [OPTIONS] <MAILBOX> ...
DESCRIPTION
chewmail is a program for archiving mail. It is inspired by the by the Python-based archivemail, but with more useful semantics. All mail
is archived to the mailbox specified with the --output-box switch, in mbox format. It can read mailboxes in mbox, Maildir and MH formats.
Internally, chewmail uses Mail::Box, so it support file names and URLs supported by that module.
OPTIONS
-o mailbox-format, --output-box=mailbox-format
The mailbox to archive messages to. The mailbox is run through the Date::Format module, so it supports all it's conversion specifiers.
The date and time is relative to the messages timestamp, or the current time if the timestamp is impossible to determine. A sample of
the conversion specifiers follows:
%% PERCENT
%b month abbr
%B month
%d numeric day of the month, with leading zeros (eg 01..31)
%e numeric day of the month, without leading zeros (eg 1..31)
%D MM/DD/YY
%G GPS week number (weeks since January 6, 1980)
%h month abbr
%H hour, 24 hour clock, leading 0's)
%I hour, 12 hour clock, leading 0's)
%j day of the year
%k hour
%l hour, 12 hour clock
%L month number, starting with 1
%m month number, starting with 01
%n NEWLINE
%o ornate day of month -- "1st", "2nd", "25th", etc.
%t TAB
%U week number, Sunday as first day of week
%w day of the week, numerically, Sunday == 0
%W week number, Monday as first day of week
%x date format: 11/19/94
%y year (2 digits)
%Y year (4 digits)
-d days-old, --days=days-old
Only archive messages older than than this many days.
-D date, --date=date
Only archive messages old than this date. The date can be any date understood by Perl's Date::Parse module.
-R, --only-read
Only archive messages that are marked seen or read.
--delete-immediately
Synchonize the mailboxes after every message is moved. This will be substantially slower but may provide better recovery for some mail-
box formats in the event of a crash.
--preserve-timestamp
Preserve the atime and mtime of the input mailbox. This only affects file-based mailboxes, such as mbox.
-n, --dry-run
Go through all the motions of archiving the mail, but don't actually change any mailboxes.
-v, --verbose
Output more informational messages. Use multiple times for more verbosity.
-q, --quiet
Don't output any messages other than error messages.
-V, --version
Print the version number then exit.
-h, --help
Print usage information then exit.
EXAMPLES
Archive two day old messages in inbox to inbox-old:
chewmail --days 2 -o inbox-old inbox
Archive read messages to a mailbox named the year-month of the message:
chewmail --only-read -o %Y-%m inbox
SEE ALSO
archivemail(1), Date::Parse, Date::Format, Mail::Box
AUTHOR
Eric Dorland <eric@kuroneko.ca>
perl v5.8.8 2006-08-15 CHEWMAIL(1)