Sponsored Content
Full Discussion: Find missing sequence
Top Forums Shell Programming and Scripting Find missing sequence Post 302879804 by danish0909 on Sunday 15th of December 2013 01:14:20 PM
Old 12-15-2013
1. List is a file which contains sequence numbers. I extract it form a DB.

(Actually we have hundreds/thousands of files coming in, we record this information in a DB. This List is extracted from the DB using the substr function.)

2. We want to put a logic on this List to find the missing sequence. Attached is a sample List

3. The intention is to inform the source that a file with the following sequence has not been received.

Please let me know if any more information is required


There can be sequence resets also so you may find more than one occurrence of the same sequence at different times

Last edited by danish0909; 12-15-2013 at 02:15 PM.. Reason: Provide more info
 

10 More Discussions You Might Find Interesting

1. Programming

find the missing sequence in hash perl

Dear Perl's Users, Could anyone help me how to solve my problem. I have data with details below. TTY NAME SEQUENCES U-0 UNIX 0 U-1 UNIX 1 U-2 UNIX 2 <-- From 2 jump to 5 U-5 UNIX 5 U-6 UNIX 6 <-- From 6 jump to 20 U-20 ... (2 Replies)
Discussion started by: askari
2 Replies

2. Shell Programming and Scripting

print out missing files in a sequence

Hello all, I have several directories with a sequence of files like this IM-0001-0001.dcm IM-0001-0002.dcm IM-0001-0003.dcm IM-0001-0004.dcm IM-0001-0005.dcm I would like to print out the name of the file that is missing. I currently have the following ineffecient way to do this... (4 Replies)
Discussion started by: avatar_007
4 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

find common entries and match the number with long sequence and cut that sequence in output

Hi all, I have a file like this ID 3BP5L_HUMAN Reviewed; 393 AA. AC Q7L8J4; Q96FI5; Q9BQH8; Q9C0E3; DT 05-FEB-2008, integrated into UniProtKB/Swiss-Prot. DT 05-JUL-2004, sequence version 1. DT 05-SEP-2012, entry version 71. FT COILED 59 140 ... (1 Reply)
Discussion started by: manigrover
1 Replies

5. 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

6. 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

7. Shell Programming and Scripting

Identifying Missing File Sequence

Hi, I have a file which contains few columns and the first column has the file names, and I would like to identify the missing file sequence number form the file and would copy to another file. My files has data in below format. APKRISPSIN320131231201319_0983,1,54,125,... (5 Replies)
Discussion started by: rramkrishnas
5 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. Shell Programming and Scripting

To check the missing file based on sequence number.

Hi All, I have a requirement that i need to list only the missing sequences with a unix script. For Example: Input: FILE_001.txt FILE_002.txt FILE_005.txt FILE_006.txt FILE_008.txt FILE_009.txt FILE_010.txt FILE_014.txt Output: FILE_003.txt FILE_004.txt FILE_007.txt FILE_011.txt... (5 Replies)
Discussion started by: Arun1992
5 Replies
MARK(1) 							     [nmh-1.5]								   MARK(1)

NAME
mark - manipulate message sequences SYNOPSIS
mark [+folder] [msgs] [-sequence name ...] [-add | -delete] [-list] [-public | -nopublic] [-zero | -nozero] [-version] [-help] DESCRIPTION
The mark command manipulates message sequences by adding or deleting message numbers from folder-specific message sequences, or by listing those sequences and messages. A message sequence is a keyword, just like one of the "reserved" message names, such as "first" or "next". Unlike the "reserved" message names, which have a fixed semantics on a per-folder basis, the semantics of a message sequence may be defined, modified, and removed by the user. Message sequences are folder-specific, e.g., the sequence name "seen" in the context of folder "+inbox" need not have any relation whatsoever to the sequence of the same name in a folder of a different name. Three action switches direct the operation of mark. These switches are mutually exclusive: the last occurrence of any of them overrides any previous occurrence of the other two. The -add switch tells mark to add messages to sequences or to create a new sequence. For each sequence named via the -sequence name argu- ment (which must occur at least once) the messages named via msgs (which defaults to "cur" if no msgs are given), are added to the sequence. The messages to be added need not be absent from the sequence. If the -zero switch is specified, the sequence will be emptied prior to adding the messages. Hence, -add -zero means that each sequence should be initialized to the indicated messages, while -add -nozero means that each sequence should be appended to by the indicated messages. The -delete switch tells mark to delete messages from sequences, and is the dual of -add. For each of the named sequences, the named mes- sages are removed from the sequence. These messages need not be already present in the sequence. If the -zero switch is specified, then all messages in the folder are added to the sequence (first creating the sequence, if necessary) before removing the messages. Hence, -delete -zero means that each sequence should contain all messages except those indicated, while -delete -nozero means that only the indi- cated messages should be removed from each sequence. As expected, the command "mark -sequence foo -delete all" deletes the sequence "foo" from the current folder. When creating or modifying sequences, you can specify the switches -public or -nopublic to force the new or modified sequences to be "pub- lic" or "private". The switch -public indicates that the sequences should be made "public". These sequences will then be readable by all nmh users with permission to read the relevant folders. In contrast, the -nopublic switch indicates that the sequences should be made "private", and will only be accessible by you. If neither of these switches is specified, then existing sequences will maintain their cur- rent status, and new sequences will default to "public" if you have write permission for the relevant folder. Check the mh-sequence(5) man page for more details about the difference between "public" and "private" sequences. The -list switch tells mark to list both the sequences defined for the folder and the messages associated with those sequences. Mark will list the name of each sequence given by -sequence name and the messages associated with that sequence. If the sequence is private, this will also be indicated. If no sequence is specified by the -sequence switch, then all sequences for this folder will be listed. The -zero switch does not affect the operation of -list. The current restrictions on sequences are: o The name used to denote a message sequence must consist of an alphabetic character followed by zero or more alphanumeric characters, and cannot be one of the (reserved) message names "new", "first", "last", "all", "next", or "prev". o Only a certain number of sequences may be defined for a given folder. This number is usually limited to 27 (11 on small systems). (The internal implementation relies on bitmasks, with some bits set aside for internal use.) o Message ranges with user-defined sequence names are restricted to the form "name:n", "name:+n", or "name:-n", and refer to the first or last `n' messages of the sequence `name', respectively. Constructs of the form "name1-name2" are forbidden for user defined sequences. FILES
$HOME/.mh_profile The user profile PROFILE COMPONENTS
Path: To determine the user's nmh directory Current-Folder: To find the default current folder SEE ALSO
flist(1), pick(1), mh-sequence(5) DEFAULTS
`+folder' defaults to the current folder `-add' if -sequence is specified, -list otherwise `msgs' defaults to cur (or all if -list is specified) `-nozero' CONTEXT
If a folder is given, it will become the current folder. HELPFUL HINTS
Use flist to find folders with a given sequence, and "pick sequence -list" to enumerate those messages in the sequence (such as for use by a shell script). MH.6.8 11 June 2012 MARK(1)
All times are GMT -4. The time now is 01:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy