02-20-2015
Script to validate dates inside a file
Hi All,
Looking forward a script with below requirement.Please let me know if any pointers.
- there is a file which contains date
- script will go inside the file and validate date is T-1 and for Friday T-3
- Send email with status
-Shell is Ksh
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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 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
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
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
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
# 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
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
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
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
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
CPAN(1) Perl Programmers Reference Guide CPAN(1)
NAME
cpan - easily interact with CPAN from the command line
SYNOPSIS
# with arguments and no switches, installs specified modules
cpan module_name [ module_name ... ]
# with switches, installs modules with extra behavior
cpan [-cfimt] module_name [ module_name ... ]
# without arguments, starts CPAN.pm shell
cpan
# without arguments, but some switches
cpan [-ahrvACDLO]
DESCRIPTION
This script provides a command interface (not a shell) to CPAN. At the moment it uses CPAN.pm to do the work, but it is not a one-shot com-
mand runner for CPAN.pm.
Meta Options
These options are mutually exclusive, and the script processes them in this order: [hvCAar]. Once the script finds one, it ignores the
others, and then exits after it finishes the task. The script ignores any other command line options.
-a Creates the CPAN.pm autobundle with CPAN::Shell->autobundle.
-A module [ module ... ]
Shows the primary maintainers for the specified modules
-C module [ module ... ]
Show the "Changes" files for the specified modules
-D module [ module ... ]
Show the module details. This prints one line for each out-of-date module (meaning, modules locally installed but have newer versions
on CPAN). Each line has three columns: module name, local version, and CPAN version.
-L author [ author ... ]
List the modules by the specified authors.
-h Prints a help message.
-O Show the out-of-date modules.
-r Recompiles dynamically loaded modules with CPAN::Shell->recompile.
-v Print the script version and CPAN.pm version.
Module options
These options are mutually exclusive, and the script processes them in alphabetical order. It only processes the first one it finds.
c Runs a `make clean` in the specified module's directories.
f Forces the specified action, when it normally would have failed.
i Installed the specified modules.
m Makes the specified modules.
t Runs a `make test` on the specified modules.
Examples
# print a help message
cpan -h
# print the version numbers
cpan -v
# create an autobundle
cpan -a
# recompile modules
cpan -r
# install modules ( sole -i is optional )
cpan -i Netscape::Booksmarks Business::ISBN
# force install modules ( must use -i )
cpan -fi CGI::Minimal URI
TO DO
BUGS
* none noted
SEE ALSO
Most behaviour, including environment variables and configuration, comes directly from CPAN.pm.
SOURCE AVAILABILITY
This source is part of a SourceForge project which always has the latest sources in CVS, as well as all of the previous releases.
http://sourceforge.net/projects/brian-d-foy/
If, for some reason, I disappear from the world, one of the other members of the project can shepherd this module appropriately.
CREDITS
Japheth Cleaver added the bits to allow a forced install (-f).
Jim Brandt suggest and provided the initial implementation for the up-to-date and Changes features.
Adam Kennedy pointed out that exit() causes problems on Windows where this script ends up with a .bat extension
AUTHOR
brian d foy, "<bdfoy@cpan.org>"
COPYRIGHT
Copyright (c) 2001-2006, brian d foy, All Rights Reserved.
You may redistribute this under the same terms as Perl itself.
perl v5.8.9 2009-04-13 CPAN(1)