Sponsored Content
Top Forums Shell Programming and Scripting finding date numeral from file and check the validity of date format Post 302574348 by manas_ranjan on Thursday 17th of November 2011 06:18:35 AM
Old 11-17-2011
you are star man.
Now can you assist me how to validate those o/p as correct date format.
My date can be in anyform from the below .

Code:
YYYYMMDD,DDMMYYYY,MMDDYYYY,MM-DD-YYYY or YYYY-MM-DD

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Check the format of Date

Hi, I have a date field in my input file. I just want to check if its in the format "DD-MM-YYYY". Is there any command which can achieve this? Thanks and Regards, Abhishek (2 Replies)
Discussion started by: AAA
2 Replies

2. Shell Programming and Scripting

convert date format to mysql date format in log file

I have a comma delimited log file which has the date as MM/DD/YY in the 2nd column, and HH:MM:SS in the 3rd column. I need to change the date format to YYYY-MM-DD and merge it with the the time HH:MM:SS. How will I got about this? Sample input 02/27/09,23:52:31 02/27/09,23:52:52... (3 Replies)
Discussion started by: hazno
3 Replies

3. Shell Programming and Scripting

Check input date format?

how to check input date format. for example $input_date must be in format dd.mm.gg script is execute like this: bin/script1.sh 14.12.2009 script1.sh code: #!/bin/sh input_date=$1 CMD="/app/si/test/test.sh $input_date" echo "*****" $CMD (2 Replies)
Discussion started by: waso
2 Replies

4. Shell Programming and Scripting

finding the previous day date and creating a file with date

Hi guys, I had a scenario... 1. I had to get the previous days date in yyyymmdd format 2. i had to create a file with Date inthe format yyyymmdd.txt format both are different thanks guys in advance.. (4 Replies)
Discussion started by: apple2685
4 Replies

5. Shell Programming and Scripting

Finding files before a certain date with predefined format

Guys, I have an input file such as below I would like to know how i would be able to find items created before 2011-10-01 Appreciate any expert advice. Thanks. (3 Replies)
Discussion started by: aismann
3 Replies

6. Shell Programming and Scripting

Converting a date to friday date and finding Min/Max date

Dear all, I have 2 questions. I have a file with many rows which has date of the format YYYYMMDD. 1. I need to change the date to that weeks friday date(Ex: 20120716(monday) to 20120720). Satuday/Sunday has to be changed to next week friday date too. 2. After converting the date to... (10 Replies)
Discussion started by: 2001.arun
10 Replies

7. Shell Programming and Scripting

How to check if date format is correct?

Hi! how do i know if the input is the same as the required date format? the date should be dd/mm/YYYY ex. 2/3/2012 or 15/11/2012 all the following conditions must return an error: *input of string *day is > 31 or < 1 *month is > 12 or < 1 *year is < 2013 suppose the date format is stored... (1 Reply)
Discussion started by: angilulu
1 Replies

8. UNIX for Dummies Questions & Answers

Rename all Files in a UNIX Directory from one date format to another date format

Hi Unix Gurus, I would like to rename several files in a Unix Directory . The filenames can have more than 1 underscore ( _ ) and the last underscore is always followed by a date in the format mmddyyyy. The Extension of the files can be .txt or .pdf or .xls etc and is case insensitive ie... (1 Reply)
Discussion started by: pchegoor
1 Replies

9. Shell Programming and Scripting

Date validity check

hi All, i have file in which it has 2000 records like, test.txt ==== 2011-03-01 2011-03-01 2011-03-01 2011-03-01 2011-03-01 2011-03-02 2011/03/02 previously i used for loop to find the date check like below, for i in `cat test.txt` do d=`echo $i | cut -c9-10| sed 's/^0*//'`;... (11 Replies)
Discussion started by: mechvijays
11 Replies

10. Shell Programming and Scripting

Date: invalid date trying to set Linux date in specific format

i try to set linux date & time in specific format but it keep giving me error Example : date "+%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01" or date +"%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01" keep giving me this error : date: invalid date ‘19-01-2017 00:05:01' Please use CODE tags... (7 Replies)
Discussion started by: umen
7 Replies
VFS_SHADOW_COPY(8)														VFS_SHADOW_COPY(8)

NAME
vfs_shadow_copy - Make a Samba share read only for a specified time period SYNOPSIS
vfs objects = shadow_copy DESCRIPTION
This VFS module is part of the samba(7) suite. The vfs_shadow_copy VFS module functionality that is similar to Microsoft Shadow Copy services. When setup properly, this module allows Mi- crosoft Shadow Copy clients to browse "shadow copies" on Samba shares. This module is stackable. CONFIGURATION
vfs_shadow_copy relies on a filesystem snapshot implementation. Many common filesystems have native support for this. Filesystem snapshots must be mounted on specially named directories in order to be recognized by vfs_shadow_copy. The snapshot mount points must be immediate children of a the directory being shared. The snapshot naming convention is @GMT-YYYY.MM.DD-hh.mm.ss, where: o YYYY is the 4 digit year o MM is the 2 digit month o DD is the 2 digit day o hh is the 2 digit hour o mm is the 2 digit minute o ss is the 2 digit second. The vfs_shadow_copy snapshot naming convention can be produced with the following date(1) command: TZ=GMT date +@GMT-%Y.%m.%d-%H.%M.%S EXAMPLES
Add shadow copy support to user home directories: [homes] vfs objects = shadow_copy CAVEATS
This is not a backup, archival, or version control solution. With Samba or Windows servers, vfs_shadow_copy is designed to be an end-user tool only. It does not replace or enhance your backup and archival solutions and should in no way be considered as such. Additionally, if you need version control, implement a version control sys- tem. VERSION
This man page is correct for version 3.0.25 of the Samba suite. AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed. VFS_SHADOW_COPY(8)
All times are GMT -4. The time now is 01:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy