12-15-2011
@vivek ... Thanks but its not working . It is giving bad substitution error.
I am a novice to scripting . Also I am using as Sun Solaris unix machine
---------- Post updated at 03:01 AM ---------- Previous update was at 02:59 AM ----------
@ni2 date command --date and -f options are not available on sun solaris machine
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
how to convert the string YYYYMMDD into YYYY.MM.DD
Please advice (1 Reply)
Discussion started by: spatra
1 Replies
2. Shell Programming and Scripting
I want to change a date from format dd-mmm-yyyy to mm/dd/yyyy. Is there a way to do this with sed or do you have to write a case statement to convert JAN to 01? Thanks (9 Replies)
Discussion started by: stringzz
9 Replies
3. Shell Programming and Scripting
How to convert the date field from dd/mm/yyyy to yyyy/mm/dd in unix
my script will generate text file which have two fields
one is date and another is name of the server for example this is sample date which I have to sort based on older to newer date the problem is when I found out sort will... (4 Replies)
Discussion started by: pareshan
4 Replies
4. UNIX for Dummies Questions & Answers
I have a file with some date columns in MM/DD/YYYY format:
SMPBR|DUP-DO NOT USE|NEW YORK||16105|BA5270715|6/6/2007 |MWERNER|109||||JOHN||SMITH|MD|72211118||||||74559|21 WILMINGTON RD||D|11/6/2003|SL# MD CONTACT-LIZ RICHARDS|||0|Y|N||1411458|
And I want to convert the date format to:
... (5 Replies)
Discussion started by: ChicagoBlues
5 Replies
5. Shell Programming and Scripting
In my shell script i have a variable which stores date in the format of YYYYMMDD. Is there any way to format this value to MM/DD/YYYY.
Thanks. (8 Replies)
Discussion started by: nasirgondal
8 Replies
6. Shell Programming and Scripting
Hi All,
I am learning PERL for one of the projects, and in one of these scripts, I read a flat text file and print in the terminal.
The problem is, the text file has a date field. The format is yyyymmdd. I need to display this as dd-mon-yyyy.
Any ideas to do this? Thanks a lot for the... (9 Replies)
Discussion started by: guruparan18
9 Replies
7. Shell Programming and Scripting
(Attention: Green PHP newbie !)
I have an online inquiry form, delivering a date in the form yyyy/mm/dd to my feedback form. If the content passes several checks, the form sends an e-mail to me. All works fine. I just would like to receive the date in the form dd/mm/yyyy. I tried with some code,... (6 Replies)
Discussion started by: keyboarder
6 Replies
8. Shell Programming and Scripting
Hello,
I am writing a script that parses different logs and produces one. In the source files, the date is in DD MM YYYY HH24:MI:SS format. In the output, it should be in DD MON YYY HH24:MI:SS (ie 25 Jan 2010 16:10:10)
To extract the dates, I am using shell substrings, i.e.:
read line
... (4 Replies)
Discussion started by: Adamm
4 Replies
9. Shell Programming and Scripting
Hi I have a problem with Date format in my code.
1st I am trying to convert today's date to yesterday's using
YESTERDAY3=`perl -e '@y=localtime(time()-86400); printf "%04d/%02d/%02d",$y+1900,$y+1,$y;$y;'`
And once it is done I am trying to using the yesterday date in a grep command to... (3 Replies)
Discussion started by: nithinankam
3 Replies
10. Programming
Hi All,
I have line
,A,FDRM0002,12/21/2017,,0.961751583,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
it contains date in mm/dd/yyyy format i want to change this to yyyymmdd format using perl.
Use code tags, thanks. (8 Replies)
Discussion started by: vishal0746
8 Replies
LEARN ABOUT DEBIAN
pmailq
PMAILQ(8) PMAILQ(8)
NAME
pmailq - Postfix MAIL Queue manager
SYNOPSIS
pmailq [OPTION]... [COMMAND]
pmailq --help
DESCRIPTION
pmailq parses the output of mailq command from postfix (ie: postqueue -p). It permits to perform some actions on a group of entries in
queue (like removing or displaying them in a machine readable format). They are selected by applying filters (wildcards are allowed) on
criterias like email address, error message from SMTP server, message size, mail status in queue.
COMMANDS
Action to perform on selected entries.
list (default command)
Show a detailed listing of the selected entries.
parse
Show a listing of the selected entries in a machine readable format.
del
Delete (via postsuper -d) the selected entries.
OPTIONS
-e PATTERN, --email=PATTERN
Select entries in queue with email matching PATTERN (PATTERN accepts wildcards).
-m PATTERN, --msg=PATTERN
Select entries in queue with error message matching PATTERN (PATTERN accepts wildcards).
-l SIZE, --size-lower=SIZE
Select entries in queue with size lower than SIZE bytes.
-u SIZE, --size-upper=SIZE
Select entries in queue with size upper than SIZE bytes.
-a
Select 'active' entries in queue.
-o
Select 'on hold' entries in queue.
--version
Show program's version number and exit.
-h, --help
Show this help message and exit.
EXAMPLES
Example 1: display all the entries in queue sent to an email address matching "*@example.com*" with a size between 3000 and 3200 bytes in
a machine readable format:
# pmailq -u 3000 -l 3200 -e "*@example.com" parse
7E75214643A4|Fri Aug 31|3154|1|0|edgar@example.com
B0BDE146B640|Thu Aug 30|3199|1|0|paul@example.com
B587E146B675|Wed Aug 29|3065|0|0|paul@example.com
CF3C514656E4|Wed Aug 29|3161|0|0|abuse@example.com
/ / /
queue id date size on hold (or not)
active (or not)
Example 2: remove all mails in queue not sent because of a connection time out:
# pmailq -m "*connection*timed*out" del
deleting 00CF514616D3 [OK]
deleting 12D911461924 [OK]
deleting 269EF1461CA9 [OK]
deleting 288DF1461CA0 [OK]
deleting 3B3901460F62 [OK]
deleting 3AE58147019F [OK]
SEE ALSO
postsuper(1) privileged queue operations, postqueue(1) mail queue control
AUTHOR
Emmanuel Bouthenot <kolter@openics.org>
COPYRIGHT AND LICENSE
Copyright 2007-2011 by Emmanuel Bouthenot <kolter@openics.org>
This program is released under the "do What The Fuck you want to Public Licence" Version 2, as published by Sam Hocevar.
See http://sam.zoy.org/wtfpl/COPYING for more details.
2011-01-05 PMAILQ(8)