07-31-2014
Hello rbatte1,
its a shell script,actually i am giving missing file status for approx 350 types.
But till now i was giving just count and missing count for month,but now i want to give exact sequence for missing files.
Now i have tried to put all sequence in one file and comparing them output is driven but my requirement is without comparing (i.e. not in file) can we do it ??
i can get sequence i.e. 00-23 using cut command but my exact problem is how to get missing sequence and put them into desired format as stated above
Also there is one more problem i would like to discuss that,i am learning Unix and till date my biggest problem is transposing rows into column,i have already posted that thread but till i didn't understand how to figure it out.
My output is like this
Quote:
folder1,24,24,24,24,24,24,total_available,total_expected,total missing,missing seq
folder2,24,24,24,24,24,24,total_available,total_expected,total missing,missing seq
and so on.
i want to transpose rows into column.Plz explain me how to figure it out.
Note :number of rows may vary Hence the transpose script first read how many rows and then convert it into columns
Thanks in advance
10 More Discussions You Might Find Interesting
1. Programming
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
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
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
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
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
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
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
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
9. Shell Programming and 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
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
RS(1) BSD General Commands Manual RS(1)
NAME
rs -- reshape a data array
SYNOPSIS
rs [-CcSs[x]] [-GgKkw N] [-EeHhjmnTtyz] [rows [cols]]
DESCRIPTION
rs reads the standard input, interpreting each line as a row of blank-separated entries in an array, transforms the array according to the
options, and writes it on the standard output. With no arguments it transforms stream input into a columnar format convenient for terminal
viewing.
The shape of the input array is deduced from the number of lines and the number of columns on the first line. If that shape is inconvenient,
a more useful one might be obtained by skipping some of the input with the -k option. Other options control interpretation of the input col-
umns.
The shape of the output array is influenced by the rows and cols specifications, which should be positive integers. If only one of them is a
positive integer, rs computes a value for the other which will accommodate all of the data. When necessary, missing data are supplied in a
manner specified by the options and surplus data are deleted. There are options to control presentation of the output columns, including
transposition of the rows and columns.
The options are as follows:
-C[x] Output columns are delimited by the single character x. A missing x is taken to be '^I'.
-c[x] Input columns are delimited by the single character x. A missing x is taken to be '^I'.
-E Consider each character of input as an array entry.
-e Consider each line of input as an array entry.
-GN The gutter width has N percent of the maximum column width added to it.
-gN The gutter width (inter-column space), normally 2, is taken to be N.
-H Like -h, but also print the length of each line.
-h Print the shape of the input array and do nothing else. The shape is just the number of lines and the number of entries on the first
line.
-j Right adjust entries within columns.
-KN Like -k, but print the ignored lines.
-kN Ignore the first N lines of input.
-m Do not trim excess delimiters from the ends of the output array.
-n On lines having fewer entries than the first line, use null entries to pad out the line. Normally, missing entries are taken from
the next line of input.
-S[x] Like -C, but padded strings of x are delimiters.
-s[x] Like -c, but maximal strings of x are delimiters.
-T Print the pure transpose of the input, ignoring any rows or cols specification.
-t Fill in the rows of the output array using the columns of the input array, that is, transpose the input while honoring any rows and
cols specifications.
-wN The width of the display, normally 80, is taken to be the positive integer N.
-y If there are too few entries to make up the output dimensions, pad the output by recycling the input from the beginning. Normally,
the output is padded with blanks.
-z Shrink column widths to fit the largest entries appearing in them.
With no arguments, rs transposes its input, and assumes one array entry per input line unless the first non-ignored line is longer than the
display width. Option letters which take numerical arguments interpret a missing number as zero unless otherwise indicated.
EXAMPLES
rs can be used as a filter to convert the stream output of certain programs (e.g., spell, du, file, look, nm, who, and wc(1)) into a conve-
nient ``window'' format, as in
$ who | rs
This function has been incorporated into the ls(1) program, though for most programs with similar output rs suffices.
To convert stream input into vector output and back again, use
$ rs 1 0 | rs 0 1
A 10 by 10 array of random numbers from 1 to 100 and its transpose can be generated with
$ jot -r 100 | rs 10 10 | tee array | rs -T >tarray
In the editor vi(1), a file consisting of a multi-line vector with 9 elements per line can undergo insertions and deletions, and then be
neatly reshaped into 9 columns with
:1,$!rs 0 9
Finally, to sort a database by the first line of each 4-line field, try
$ rs -eC 0 4 | sort | rs -c 0 1
SEE ALSO
jot(1), pr(1), sort(1), vi(1)
BUGS
Handles only two dimensional arrays.
The algorithm currently reads the whole file into memory, so files that do not fit in memory will not be reshaped.
Fields cannot be defined yet on character positions.
Re-ordering of columns is not yet possible.
There are too many options.
BSD
April 14, 2012 BSD