Sponsored Content
Top Forums Shell Programming and Scripting date and time in mm/dd/yyyy hh:mm format Post 302365865 by smarty86 on Wednesday 28th of October 2009 08:27:51 AM
Old 10-28-2009
Quote:
Originally Posted by dr.house
Code:
[house@leonov] echo "This was sent by Ezzat on 10/15/2009 12:48 ....." \
[............] | egrep -o "[0-9]{2}/[0-9]{2}/[0-9]{4} [0-9]{2}:[0-9]{2}"
10/15/2009 12:48

it is not working for me. Giving error as illegal option -o.

and do I need to use [house@leonov] [............] these 2 things? no right?

Please help me
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sed to display date in dd/mm/yyyy format

Hi I have a sed command sed -e "s/sub_date/=$(date +"%d/%m/%Y")/" sub_create_tmp I want to substitute with the current date in dd/mm/yyyy format . But the result is an error " cannot parse " . Pls help . sars (2 Replies)
Discussion started by: sars
2 Replies

2. UNIX for Dummies Questions & Answers

Format date from MM/DD/YYYY to YYYYMMDD

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

3. Shell Programming and Scripting

Date difference between 2 dates in 'yyyy-mm-dd hh:mm:ss' format

Hi all, I know this may have already been asked but hey ho... i have two dates in the 'yyyy-mm-dd hh:mm:ss' format. '2009-01-03 01:00:00' '2009-04-05 00:00:00' How can i, in shell script determine their differences? Please note, the time may not be available, so please suggest both... (4 Replies)
Discussion started by: muay_tb
4 Replies

4. Shell Programming and Scripting

change date format from yyyy/mm/dd to dd/mm/yyyy

(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

5. Shell Programming and Scripting

Need date in the format [mm dd yyyy hh AM/PM]

could you please help be on the below code .. Requirement is when i pass the parameter(for below 2) i should get current time -2 hours in the format :wall:.. cur_dt=`$ICEBIN/sqsh -S$DSQUERY -U $BATCHID -P $PASSWD -h -C"select getdate()" | sed '2d'` pr_dt="`$ICEBIN/sqsh -S$DSQUERY -U $BATCHID... (2 Replies)
Discussion started by: karthicss
2 Replies

6. Shell Programming and Scripting

need code for date which is in yyyy-mm-dd format

Hi, I am having one log files. contains som data according to date. And it is going to append .Eg:abc.log contains below data 2011-10-19 abjhgj 2011-10-19 gjhgjgj 2011-10-20 hhhjh 2011-10-20 hhhhjj 2011-10-21 gg . . . 2011-11-24 yyy from log files i want catch only... (2 Replies)
Discussion started by: aish11
2 Replies

7. Shell Programming and Scripting

Convert any date format into yyyy/mm/dd

How can I convert any user inputted date into yyyy/mm/dd ? For example user can input date one of the following 20120121 , 2012-01-21 ,01/21/2012,01/21/2012 etc But I need to convert any of the date entered by user into yyyy/mm/dd (2012/01/2012). Any suggestion. Thanks in advance this is... (1 Reply)
Discussion started by: ZeroHedge
1 Replies

8. Shell Programming and Scripting

Date Format MM/DD/YYYY

I am changing epoch times to dates. I was able to do the following: echo "$varx" | gawk '{print strftime("%c", $0)}' Mon Dec 31 16:26:40 2012 This changes the epoch date (which is what varx is) into localtime. However, my problem is that I only want 12/31/2012 and not the Mon Dec 31... (2 Replies)
Discussion started by: newbie2010
2 Replies

9. Shell Programming and Scripting

How to get last 12 month date in YYYY.MM format?

I need the date format in YYYY.MM format and I am able to get current month date as well as previous month date with below command PM=`date +'%Y.%m' -d 'last month'` CM=`date +'%Y.%m' -d 'now'` but I need to get YYYY.MM date format for previous 12 months so could you please help me how I get... (2 Replies)
Discussion started by: Amit Joshi
2 Replies

10. Shell Programming and Scripting

Date format YYYY/MM/DD to DD/MM/YYYY

I am getting output of YYYY-MM-DD and want to change this to DD/MM/YYYY. When am running the query in 'Todd' to_date(column_name,'DD/MM/YYYY') am getting the required o/p of DD/MM/YYYY, But when am executing the same query(Netezza) in linux server(bash) am getting the output of YYYY-MM-DD file... (3 Replies)
Discussion started by: Roozo
3 Replies
aepattr(5)							File Formats Manual							aepattr(5)

NAME
aepattr - aegis project attribute file DESCRIPTION
The project attribute file is used to store modifiable information about a project. CONTENTS
description = string; This field contains a description of the project. Large amounts of prose are not required; a single line is sufficient. developer_may_review = boolean; If this field is true, then a developer may review her own change. This is probably only a good idea for projects of less than 3 people. The idea is for as many people as possible to critically examine a change. Note that the develop_end_action field may not contradict the developer_may_review field. If developers may not review their own work, then their changes may not goto directly to the being integrated state (as this means much the same thing). developer_may_integrate = boolean; If this field is true, then a developer may integrate her own change. This is probably only a good idea for projects of less than 3 people. The idea is for as many people as possible to critically examine a change. reviewer_may_integrate = boolean; If this field is true, then a reviewer may integrate a change she reviewed. This is probably only a good idea for projects of less than 3 people. The idea is for as many people as possible to critically examine a change. developers_may_create_changes = boolean; This field is true if developers may created changes, in addition to administrators. This tends to be a very useful thing, since developers find most of the bugs. forced_develop_begin_notify_command = string; This command is used to notify a developer that a change requires developing; it is issued when a project administrator uses an aedb -User command to force development of a change by a specific user. All of the substitutions described in aesub(5) are avail- able. This field is optional. Executed as: the new developer. Current directory: the development directory of the change for the new developer. Exit status: ignored. develop_end_notify_command = string; This command is used to notify that a change is ready for review. It will probably use mail, or it could be an in-house bulletin board. This field is optional, if not present no notification will be given. This command could also be used to notify other management systems, such as progress and defect tracking. All of the substitutions described by aesub(5) are available. Executed as: the developer. Current directory: the development directory of the change. Exit status: ignored. develop_end_undo_notify_command = string; This command is used to notify that a change had been withdrawn from review for further development. It will probably use mail, or it could be an in-house bulletin board. This field is optional, if not present no notification will be given. This command could also be used to notify other management systems, such as progress and defect tracking. All of the substitutions described by aesub(5) are available. Executed as: the developer. Current directory: the development directory of the change. Exit status: ignored. review_begin_notify_command = string; This command is used to notify that a review has begun. It will probably use mail, or it could be an in-house bulletin board. This field is optional, if not present no notification will be given. This command could also be used to notify other management systems, such as progress and defect tracking. All of the substitutions described by aesub(5) are available. Executed as: the reviewer. Current directory: the development directory of the change. Exit status: ignored. review_begin_undo_notify_command = string; This command is used to notify that a review is no longer in progress, the reviewer has withdrawn. It will probably use mail, or it could be an in-house bulletin board. This field is optional, if not present no notification will be given. This command could also be used to notify other management systems, such as progress and defect tracking. All of the substitutions described by aesub(5) are available. Executed as: the reviewer. Current directory: the development directory of the change. Exit status: ignored. review_pass_notify_command = string; This command is used to notify that a review has passed. It will probably use mail, or it could be an in-house bulletin board. This field is optional, if not present no notification will be given. This command could also be used to notify other management systems, such as progress and defect tracking. All of the substitutions described by aesub(5) are available. Executed as: the reviewer. Current directory: the development directory of the change. Exit status: ignored. review_pass_undo_notify_command = string; This command is used to notify that a review has passed. It will probably use mail, or it could be an in-house bulletin board. This field is optional, if not present no notification will be given. This command could also be used to notify other management systems, such as progress and defect tracking. Defaults to the same action as the develop_end_notify_command field. All of the substitutions described by aesub(5) are available. Executed as: the reviewer. Current directory: the development directory of the change. Exit status: ignored. review_fail_notify_command = string; This command is used to notify that a review has failed. It will probably use mail, or it could be an in-house bulletin board. This field is optional, if not present no notification will be given. This command could also be used to notify other management systems, such as progress and defect tracking. All of the substitutions described by aesub(5) are available. Executed as: the reviewer. Current directory: the development directory of the change. Exit status: ignored. integrate_pass_notify_command = string; This command is used to notify that an integration has passed. It will probably use mail, or it could be an in-house bulletin board. This field is optional, if not present no notification will be given. This command could also be used to notify other management systems, such as progress and defect tracking. All of the substitutions described by aesub(5) are available. Some compilers bury absolute path names into object files and executables. The renaming of the integration directory to become the new baseline breaks these paths. This command is passed an environment variable called AEGIS_INTEGRATION_DIRECTORY so that the appropriate symlink may be placed, if desired. Executed as: the project owner. Current directory: the new project baseline. Exit status: ignored. integrate_fail_notify_command = string; This command is used to notify that an integration has failed. It will probably use mail, or it could be an in-house bulletin board. This field is optional, if not present no notification will be given. This command could also be used to notify other management systems, such as progress and defect tracking. All of the substitutions described by aesub(5) are available. Executed as: the integrator. Current directory: the development directory of the change. Exit status: ignored. default_development_directory = string; The pathname of where to place new development directories. The pathname must be absolute. This field is only consulted if the field of the same name in the user configuration file is not set. umask = integer; File permission mode mask. See umask(2) for more information. This value will always be OR'ed with 022, because aegis is para- noid. default_test_exemption = boolean; This field contains what to do when a change is created with no test exemption specified. default_test_regression_exemption = boolean; This field contains what to do when a change is created with no regression test exemption specified. minimum_change_number = integer; The minimum change number for aenc(1), if no change number is specified. This allows the low-numbered change numbers to be used for branches later in the project. reuse_change_numbers = boolean; This controls whether the automatically selected aenc(1) change numbers "fill in" any gaps. Defaults to true if not set. minimum_branch_number = integer; The minimum branch number for aenbr(1), if no branch number is specified. Defaults to 1 if not set. skip_unlucky = boolean; This field may be set to true if you want to skip various unlucky numbers for changes, branches and tests. Various traditions are avoided, both Eastern and Western. Defaults to false if not set. compress_database = boolean; This field may be set to true if you want to compress the database on writing. (It is always uncompressed on reading if neces- sary.) Defaults to false if not set. Unless you have an exceptionally large project, coupled with fast CPUs and high network latency, there is probably very little benefit in using this feature. (The database is usually less than 5% of the size of the repository.) On slow networks, however, this can improve the performance of file-related commands. develop_end_action = ( ...); This field controls the state the change enters after a successful aede(1) action. goto_being_reviewed This means that the change goes from the being_developed state to the being_reviewed state. The aerb(1) command only sends informative email. goto_awaiting_review This means that the change goes from the being_developed state to the awaiting_review state. The aerb(1) command is now mandatory. goto_awaiting_integration This means that the change goes from the being_developed state into the awaiting_integration state. Code review is skipped entirely. If the developer_may_review is false, it is not possible to use this setting. Note that the develop_end_action field may not contradict the developer_may_review field. If developers may not review their own work, then their changes may not goto directly to the being integrated state (as this means much the same thing). A contradictory setting will be replaced with goto_being_reviewed. protect_development_directory = boolean; This field may be used to protect the development directory after the being developed state. It does this by making it read-only at develop end time. Should the change ever be returned to the being developed state, it will be made writable again. The default is false, meaning to leave the development directory writable while is being reviewed and integrated. Aegis' normal tampering detection will notice if files are changed, but there is no reminder to the developer that the change should be left alone. This field defaults to false, because it can sometimes be slow. SEE ALSO
aepa(1) modify the attributes of a project aegis(5) aegis file format syntax aecattr(5) change attributes file format aecstate(5) change state file format, particularly as branches are used to remember most project state aepstate(5) project state file format COPYRIGHT
aegis version 4.24.3.D001 Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Peter Miller The aegis program comes with ABSOLUTELY NO WARRANTY; for details use the 'aegis -VERSion License' command. This is free software and you are welcome to redistribute it under certain conditions; for details use the 'aegis -VERSion License' command. AUTHOR
Peter Miller E-Mail: millerp@canb.auug.org.au //* WWW: http://www.canb.auug.org.au/~millerp/ Reference Manual Aegis aepattr(5)
All times are GMT -4. The time now is 11:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy