Sponsored Content
Top Forums UNIX for Advanced & Expert Users Checking missing data's sequence (shell script | UNIX command) Post 302731817 by septian.tri on Thursday 15th of November 2012 10:58:56 PM
Old 11-15-2012
[Solved] Checking missing data's sequence (shell script | UNIX command)

Dear All members,

i have some trouble here, i want to ask your help. The case is:

I have some data, it's like:
-ABCD1234
-ABCD1235
-ABCD1237
-BCDE1111
-BCDE1112
-BCDE1114

there is some missing data's sequence (the format is: ABCD = name 1234 = sequence).

I want to print the missing sequence (ABCD1236 and BCDE1113) and direct into one file.
Ex:
~more missing-sequence.txt
ABCD1236
BCDE1113

the data above is missing in my directory. Can someone help me to give me an example of shell script to check the missing file?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to extract data using UNIX shell script?

Hello All, I am starting with UNIX. Any help is highly appreciated. How to extract data using UNIX shell script? And how do you export data using UNIX shell scripts into Microsoft Excel format? Thank you. (3 Replies)
Discussion started by: desiondarun
3 Replies

2. Shell Programming and Scripting

Unix script for Checking sequence

Hello, I need Unix script for Checking sequence and get output in a file for missing sequences information. We are moving archive log to a server for DR .if any files miss from sequence DR will fails. so we need script to monitor sequence of files which are FTP from the Production servers .... (2 Replies)
Discussion started by: Rata_raj
2 Replies

3. Shell Programming and Scripting

How to take the missing sequence Number?

Am using unix aix KSH... I have the files called MMRR0106.DAT MMRR0206.DAT MMRR0406.DAT MMRR0506.DAT MMRR0806.DAT .... ... MMRR3006.DAT MMRR0207.DAT These files are in one dircetory /venky ? I want the output like this ? Missing files are : MMRR0306.DAT MMRR0606.DAT... (7 Replies)
Discussion started by: Venkatesh1
7 Replies

4. Shell Programming and Scripting

How to check missing sequence?

I want to listed files every hours and check the missing sequence my file format is CV.020220131430.txt CV.020220131440.txt CV.020220131450.txt CV.ddmmyyhhm.txt how to check if i have missing files in sequence .. thanks (3 Replies)
Discussion started by: before4
3 Replies

5. Shell Programming and Scripting

Case script to get missing sequence among files

I want to use case statement to find the range of missing sequence in my directory which it has some few ( dat & DAT ) files my directory /home/arm/my_folder/20130428 contains : f01_201304280000.DAT f01_201304280001.DAT f01_201304280003.DAT f02_201304280000.dat f02_201304280002.dat... (2 Replies)
Discussion started by: arm
2 Replies

6. Shell Programming and Scripting

Data export UNIX shell script

Hi, I want to write a shell script which connect to my database with the following credentials : User name : user PWD : rap_user_1 Hostname : app.Unix.Gsm1900.Org Port : 7862 SID : PTNC1 Once connected to DB i want to fetch data with the help of a SQL statement and expoet... (4 Replies)
Discussion started by: neeraj617
4 Replies

7. Shell Programming and Scripting

How can i run sql queries from UNIX shell script and retrieve data into text docs of UNIX?

Please share the doc asap as very urgently required. (1 Reply)
Discussion started by: 24ajay
1 Replies

8. Shell Programming and Scripting

Find the missing sequence

Dear all i am having file with max 24 entries. i want to find which sequence is missing file is like this df00231587.dat df01231587.dat df03231587.dat df05231587.dat . . . df23231587.dat the changing seq is 00-23,so i would like to find out which seq is missing like in above... (13 Replies)
Discussion started by: sagar_1986
13 Replies

9. Shell Programming and Scripting

How to find a missing file sequence using shell scripting?

Hey guys, I want the below files to be processed with the help of BASH so that i will be able to find the missing file names : PP01674520141228X.gz PP01674620141228X.gz PP01674820141228X.gz PP01674920141228X.gz PP01675420141228X.gz PP01675520141228X.gz PP01676020141228X.gz . . . .... (4 Replies)
Discussion started by: TANUJ
4 Replies

10. UNIX for Beginners Questions & Answers

Compilation error character is missing-UNIX shell script

Dear Friends, Regarding Compilation error character is missing-unix shell script I am new to unix shell script. My requirement is --I need to find out 3 files in my UBM unix directory,if any one(CMUSER) file is available means,then i need to exit from my unix script, Below is my unix... (2 Replies)
Discussion started by: Joseph2017
2 Replies
FormValidator::Simple::Results(3pm)			User Contributed Perl Documentation		       FormValidator::Simple::Results(3pm)

NAME
FormValidator::Simple::Results - results of validation SYNOPSIS
my $results = FormValidator::Simple->check( $req => [ name => [qw/NOT_BLANK ASCII/, [qw/LENGTH 0 10/] ], email => [qw/NOT_BLANK EMAIL_LOOSE/, [qw/LENGTH 0 30/] ], ] ); if ( $results->has_error ) { foreach my $key ( @{ $results->error() } ) { foreach my $type ( @{ $results->erorr($key) } ) { print "invalid: $key - $type "; } } } DESCRIPTION
This is for handling resuls of FormValidator::Simple's check. This object behaves like Data::FormValidator's results object, but has some specific methods. CHECK RESULT
has_missing If there are missing values ( failed in validation 'NOT_BLANK' ), this method returns true. if ( $results->has_missing ) { ... } has_invalid If there are invalid values ( failed in some validations except 'NOT_BLANK' ), this method returns true. if ( $results->has_invalid ) { ... } has_error If there are missing or invalid values, this method returns true. if ( $results->has_error ) { ... } success inverse of has_error unless ( $resuls->success ) { ... } ANALYZING RESULTS
missing no argument When you call this method with no argument, it returns keys failed 'NOT_BLANK' validation. my $missings = $results->missing; foreach my $missing_data ( @$missings ) { print $missing_data, " "; } # -- print out, for example -- # name # email key When you call this method with key-name, it returnes true if the value of the key is missing. if ( $results->missing('name') ) { print "name is empty! "; } invalid no argument When you call this method with no argument, it returns keys that failed some validation except 'NOT_BLANK'. my $invalids = $results->invalid; foreach my $invalid_data ( @$invalids ) { print $invalid_data, " "; } # -- print out, for example -- # name # email key When you call this method with key-name, it returns names of failed validation. my $failed_validations = $results->invalid('name'); foreach my $validation ( @$failed_validations ) { print $validation, " "; } # -- print out, for example -- # ASCII # LENGTH key and validation-name When you call this method with key-name, it returns false if the value has passed the validation. if ( $results->invalid( name => 'LENGTH' ) ) { print "name is wrong length! "; } error This doesn't distinguish 'missing' and 'invalid'. You can use this like 'invalid' method, but this consider 'NOT_BLANK' same as other validations. my $error_keys = $results->error; my $failed_validation = $resuls->error('name'); # this includes 'NOT_BLANK' if ( $results->error( name => 'NOT_BLANK' ) ) { print "name is missing! "; } if ( $results->error( name => 'ASCII' ) ) { print "name should be ascii code! "; } SEE ALSO
FormValidator::Simple AUTHOR
Lyo Kato <lyo.kato@gmail.com> COPYRIGHT AND LICENSE
This library is free software. You can redistribute it and/or modify it under the same terms as perl itself. perl v5.14.2 2011-12-08 FormValidator::Simple::Results(3pm)
All times are GMT -4. The time now is 04:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy