Sponsored Content
Top Forums Shell Programming and Scripting Script to validate dates inside a file Post 302935957 by dattatraya on Friday 20th of February 2015 01:53:37 PM
Old 02-20-2015
Thanks for your response.

I am really confused from where i should start .

File contain looks like below, i need to pick the date and compare with system date whether it's T-1 or not from Tuesday to Friday and on Monday T-3

cat ABC.txt
fdhf fdhg r

20/02/2015
fhbredsfie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need script to generate all the dates in DDMMYY format between 2 dates

Hello friends, I am looking for a script or method that can display all the dates between any 2 given dates. Input: Date 1 290109 Date 2 010209 Output: 300109 310109 Please help me. Thanks. :):confused: (2 Replies)
Discussion started by: frozensmilz
2 Replies

2. Shell Programming and Scripting

The scope of the shell/perl script is to read the input text file. Validate the expiry date of each

The scope of the shell/perl script is to read the input text file. Validate the expiry date of each certificate and send the mail to the user. The user takes action to add the new certificate to the storage file and user owns the responsibility to update the input text file with the new certificate... (5 Replies)
Discussion started by: casmo
5 Replies

3. Shell Programming and Scripting

ksh compare dates INSIDE a file (ie date A is > date B)

In KSH, I am pasting 2 almost identical files together and each one has a date and time on each line. I need to determine if the first instance of the date/time is greater than the 2nd instance of the date/time. If the first instance is greater, I just need to echo that line. I thought I would... (4 Replies)
Discussion started by: right_coaster
4 Replies

4. Shell Programming and Scripting

Script to validate file header and trailer

Hi, I need a script that validates a file header/detail/trailer. File layout is: Header - Rec_Type|File_name|File_Date Detail - Rec_Type|field1|field2|field3... Trailder - Rec_Type|File_name|File_Date|Record_count Sample Data: HDR|customer_data.dat|20120709... (7 Replies)
Discussion started by: ash_sh
7 Replies

5. Shell Programming and Scripting

Need script to validate file according to date

Hi All, I am very new to unix and just started to work with unix and shell scripting.I have a query anyone help would be much appreciated I am using sun solaris OS I want to validate a file according to its date and if validate successful then it would write the file name,size,date and... (3 Replies)
Discussion started by: sv0081493
3 Replies

6. Shell Programming and Scripting

Script to read a log file and run 2nd script if the dates match

# cat /tmp/checkdate.log SQL*Plus: Release 11.2.0.1.0 Production on Mon Sep 17 22:49:00 2012 Copyright (c) 1982, 2009, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production FIRST_TIME NEXT_TIME... (1 Reply)
Discussion started by: SarwalR
1 Replies

7. Shell Programming and Scripting

Validate file count in korn shell script

Hi, I have files in the directory like below which I need to validate if all the required files are present. A_B_001 of 002_time1.txt A_B_002 of 002_time1.txt A_B_001 of 001_time2.txt Scenarios- a)If file with 001 of 002_time1 or 002 of 002_time1 is missing in the folder,script should... (6 Replies)
Discussion started by: aneeta13
6 Replies

8. Shell Programming and Scripting

Need a ready Shell script to validate a high volume data file

Hi, I am looking for a ready shell script that can help in loading and validating a high volume (around 4 GB) .Dat file . The data in the file has to be validated at each of its column, like the data constraint on each of the data type on each of its 60 columns and also a few other constraints... (2 Replies)
Discussion started by: Guruprasad
2 Replies

9. Shell Programming and Scripting

Need Help:Shell Script for Solaris to change the dates in a file by one week

I have to increase the date by one week in an input when script is executed in solaris. I was able to acheive this using ksh script that is working in Linux enivironment, when i execute the same script in Solaris i am getting below error: /var/tmp\n\r-> ./script.ksh date: illegal option -- d... (3 Replies)
Discussion started by: sriramanaramoju
3 Replies

10. Shell Programming and Scripting

Script to validate header in a csv file

Hi All; I am struggling to write a script that validates file header. Header file would be like below with TAB separated TRX # TYPE REF # Source Piece Code Destination Piece Code every time I need to check the txt file if the header was same as above fields if validation success... (6 Replies)
Discussion started by: heye18
6 Replies
time_lock_es(3) 					     Library Functions Manual						   time_lock_es(3)

NAME
time_lock_es - Check time-of-day locking (Enhanced Security) LIBRARY
Security Library (libsecurity.so) SYNOPSIS
#include <sys/types.h> #include <sys/security.h> #include <prot.h> int time_lock_es ( struct es_passwd *prpwd ); PARAMETERS
Specifies a protected password entry structure. DESCRIPTION
The time_lock_es() function performs time-of-day lock checking for the current date and time against the time-of-day specification in the fd_tod string of the prpwd parameter. The function returns 1 if the time lock is on and 0 if there is no lock. The fd_tod specification is like that found in the UUCP Systems file. The specification is a comma-separated list of entries. If the cur- rent time matches an entry in the specification, the time lock is not on. The entries are scanned until a match is found. If no match can be found, the time lock is on. Each entry appears as follows: <day><start_time-end_time> The day is one of the following: Matches any day of the week. Matches Monday through Friday. Sunday Monday Tuesday Wednesday Thursday Friday Saturday The times are military time, for example, 9:15 am is 0915, 6:00 pm is 1800, and 12:42 am is 0042. When start_time is less than end_time, the range of times contains valid times in which to log in that day. When the times are equal or there is only one time (including no time at all), the entire day is valid. When start_time is later than end_time, times outside the range are valid. For instance, if start_time is 04:15 and end_time is 02:00, then any time that falls outside the range of 02:00 to 04:15 is a valid time. NOTES
Programs using this function must be compiled with -lsecurity. In order to quickstart a program, the program must be linked as follows: -lsecurity -ldb -laud -lm See the shared library discussion in the Programmer's Guide for more information about using the quickstarting feature. delim off time_lock_es(3)
All times are GMT -4. The time now is 09:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy