Sponsored Content
Top Forums UNIX for Advanced & Expert Users Checking missing data's sequence (shell script | UNIX command) Post 302731841 by itkamaraj on Thursday 15th of November 2012 11:42:09 PM
Old 11-16-2012
Code:
$ nawk 'NR==1{name=substr($0,1,4);seq=substr($0,5,4);next}{name1=substr($0,1,4);seq1=substr($0,5,4); if(name == name1){for(i=seq+1;i<seq1;i++){print name""i}}name=name1;seq=seq1;}' input.txt
ABCD1236
BCDE1113

This User Gave Thanks to itkamaraj For This Post:
 

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
mailq(1)						      General Commands Manual							  mailq(1)

NAME
mailq - prints the mail queue SYNOPSIS
DESCRIPTION
prints a summary of the mail messages queued for future delivery. The first line printed for each message shows the internal identifier used on this host for the message, the size of the message in bytes, the date and time the message was accepted into the queue, and the envelope sender of the message. The second line shows the error message that caused this message to be retained in the queue; it will not be present if the message is being processed for the first time. The status characters are: to indicate that the job is being processed to indicate that the load is too high to process the job to indicate that the job is too new in the queue to process. The output lines that follow the second line show the message recipients, one per line. is identical to Options The supported options are: Show the mail submission queue specified in the file instead of the MTA queue specified in the file. Show the lost items in the mail queue instead of normal queue items. Show the quarantined items in the mail queue instead of the normal queue items. Limit processed jobs to those containing substr as a substring of the queue ID or not when is specified. Limit processed jobs to quarantined jobs containing substr as a substring of the quarantine reason or not when is specified. Limit processed jobs to those containing substr as a substring of one of the recipients or not when is specified. Limit processed jobs to those containing substr as a substring of the sender or not when is specified. Print verbose information. This adds the priority of the message and a single character indicator or blank) indicating whether a warning message has been sent on the first line of the message. In addition, extra lines may be intermixed with the recipients indicating the `controlling user' information. This shows who owns the programs that are executed on behalf of this message and the name of the alias this command expanded from, if any. RETURN VALUE
The utility exits with 0 on success, and >0 if an error occurs. AUTHOR
was developed by the University of California, Berkeley, and originally appeared in 4.0BSD. FILES
mail queue files for SEE ALSO
sendmail(1M). mailq(1)
All times are GMT -4. The time now is 02:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy