Sponsored Content
Top Forums Shell Programming and Scripting Need to find the gap in the sequence of numbers Post 302502195 by michaelrozar17 on Monday 7th of March 2011 07:36:47 AM
Old 03-07-2011
One way through scripting..I wouldn't claim it to be faster unless the sequence of number is less.
Code:
#!/usr/bin/ksh
n=1
while [[ $n -le 30 ]] # Considering max of 30 sequence numbers present in file
do
        grep -wq $n sdf
        [[ $? -ne 0 ]] && echo "Missing: $i"
        ((n+=1))
done

---------- Post updated at 06:06 PM ---------- Previous update was at 05:46 PM ----------

Sorry.Misunderstood the requirement. Ignore the above script..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how can i isolate the random sequence of numbers using awk?

as you can see there is a delimiter after c8 "::". Awk sees the rest as fields because it doesn't recognize spaces and tabs as delimiters. So i am basically looking to isolate 20030003ba13f6cc. Can anyone help? c8::20030003ba13f6cc disk connected configured unknown (2 Replies)
Discussion started by: rcon1
2 Replies

2. UNIX for Dummies Questions & Answers

creating sequence numbers in unix

Hi, Is there a way to create sequence numbers in unix i have a set of batches(which contain records) and i want to assign a number to every batch. how can i do that? (1 Reply)
Discussion started by: dnat
1 Replies

3. Shell Programming and Scripting

Perl verify if numbers in a column of a file are in sequence

I am just a newbie to perl scripting. I need help with listing of hexadecimal numbers in a column as follows. INPUT FIle: 08AF ship steel 08B0 ship steel 08B1 ship steel 08B2 flight docs 08B3 flight docs 08B4 flight docs 08B5 flight docs 08B6 flight decl ... (3 Replies)
Discussion started by: dynamax
3 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. Homework & Coursework Questions

program to find and print a Fibonacci sequence of numbers. --Errors

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: I am trying to convert a C language program over to Sparc Assembley and I am getting Undefined first referenced... (4 Replies)
Discussion started by: kenjiro310
4 Replies

6. Shell Programming and Scripting

Finding contiguous numbers in a list but with a gap number tolerance

Dear all, I have a imput file like this imput scaffold_0 10558458 10558459 1.8 scaffold_0 10558464 10558465 1.75 scaffold_0 10558467 10558468 1.8 scaffold_0 10558468 10558469 1.71428571428571 scaffold_0 10558469... (5 Replies)
Discussion started by: valente
5 Replies

7. Shell Programming and Scripting

Find missing sequence

Hi, I need to find out the missing sequence from a list. However the issue is there is not a fixed start and end, it depends on the generation of files. For eg, it might start with 4000 and end with 9000. Based on this, I need a script which greps the start and end sequence from the... (3 Replies)
Discussion started by: danish0909
3 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

Script to generate sequence of numbers

I need awk script to generate part number sequencing based on data in multiple columns like below Input File --------- Col A|Col B|Col C| 1|a|x| 2|b|y| |c|z| | |m| | |n| And out put should be like 1ax 1ay 1az 1am 1an 1bx 1by (6 Replies)
Discussion started by: aramacha
6 Replies

10. Shell Programming and Scripting

Creating a sequence of numbers in a line for 1000 files

Hi, I try to explain my problem , I have a file like this: aasdsaffsc23 scdsfsddvf46567 mionome0001.pdb asdsdvcxvds dsfdvcvc2324w What I need to do is to create 1000 files in which myname line listing a sequence of numbers from 0001 to 1000. So I want to have : nomefile0001.txt that must... (10 Replies)
Discussion started by: danyz84
10 Replies
SQUIZZ(1)							   User Manuals 							 SQUIZZ(1)

NAME
squizz - Sequence format checker SYNOPSIS
squizz [-AShlns] [-c format] [-f format] file OPTIONS
Following command line options are allowed: -A Restrict detection/verification to alignment formats (conflict with -S option). -S Restrict detection/verification to sequence formats (conflict with -A option). -c format Convert detected sequence/alignment into format. This option implies strict alignment checking. -f format Assume input format is format. Do not try to detect the format, just verify that the given one is correct. -h Usage display. -l List all supported formats. -n Count and report detected entries. This option is only available when the detection is restricted to a single type (with -A or -S options) and strict checks (without -s option) are enabled. -s Disable strict format checks (enabled by default). DESCRIPTION
squizz is a sequence format file checker, but it has some conversion capabilities too. squizz can detect the most common sequence and alignment formats : * EMBL, FASTA, GCG, GDE, GENBANK, IG, NBRF, PIR (codata), RAW, and SWISSPROT. * CLUSTAL, FASTA, MSF, NEXUS, PHYLIP (interleaved and sequential) and STOCKHOLM. squizz can do some conversions too, if the format the input format is supported. Only 3 types are available : sequence to sequence, align- ment to alignment, and alignment to sequence (the last one, sequence to alignment, require multiple alignments algorithms and cannot be handled with formatting tools). Strict format checks validate the previously detected objects, by making some sanity checks: - sequence strings must exists. - alignment is made of more than one sequence. - alignment sequence strings must have the same length. - alignment sequence names must exists, and be unique. SEE ALSO
seqfmt(5), alifmt(5) AUTHOR
Nicolas Joly (njoly@pasteur.fr), Institut Pasteur. Unix 2009-05-19 SQUIZZ(1)
All times are GMT -4. The time now is 09:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy