Sponsored Content
Top Forums UNIX for Advanced & Expert Users Filter table of different length Post 303016464 by GDC on Friday 27th of April 2018 08:34:48 AM
Old 04-27-2018
Hi Corona688,

the output should be a text file

Code:
ID_AB1;sensor01;low;low;low
ID_AB2;sensor01;sensor02;sensor03;low
ID_AC3;sensor01;sensor02;sensor03;sensor04
ID_AD1;sensor01;low;na;na
ID_BA2;na;na;na;na

Thank for considering my problem
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

creating a fixed length output from a variable length input

Is there a command that sets a variable length? I have a input of a variable length field but my output for that field needs to be set to 32 char. Is there such a command? I am on a sun box running ksh Thanks (2 Replies)
Discussion started by: r1500
2 Replies

2. UNIX for Dummies Questions & Answers

Sed working on lines of small length and not large length

Hi , I have a peculiar case, where my sed command is working on a file which contains lines of small length. sed "s/XYZ:1/XYZ:3/g" abc.txt > xyz.txt when abc.txt contains lines of small length(currently around 80 chars) , this sed command is working fine. when abc.txt contains lines of... (3 Replies)
Discussion started by: thanuman
3 Replies

3. UNIX for Dummies Questions & Answers

What the command to find out the record length of a fixed length file?

I want to find out the record length of a fixed length file? I forgot the command. Any body know? (9 Replies)
Discussion started by: tranq01
9 Replies

4. Shell Programming and Scripting

How to filter a table by two columns

Dear Forum, I would like to know how could I found every result from one column at a table based at two table. Exemplo: Table: Red 4 Red 5 Red 10 Black 33 Black 44 Black 5 Green 2 Green 55 Green 78 I would like to have every color with the lower result... (12 Replies)
Discussion started by: lColli
12 Replies

5. Shell Programming and Scripting

Flat file-make field length equal to header length

Hello Everyone, I am stuck with one issue while working on abstract flat file which i have to use as input and load data to table. Input Data- ------ ------------------------ ---- ----------------- WFI001 Xxxxxx Control Work Item A Number of Records ------ ------------------------... (5 Replies)
Discussion started by: sonali.s.more
5 Replies

6. Shell Programming and Scripting

Filter rows from table

Hi , I need to filter input file according to following All rows with the following conditions should be removed 1) If in a row, the number of 'N's starting col 2 exceeds 2 (3 or more) OR 2) If a row is duplicated with the same value, starting col 2, A value 'N' is considered missing... (1 Reply)
Discussion started by: newbie83
1 Replies

7. Shell Programming and Scripting

Filter (by max length) only lines not matching regex

I have a large file of many pairs of sequences and their headers, which always begin with '>' I'm looking for help on how to retain only sequences (and their headers) below a certain length. So if min length was 10, output would be I can filter by length, but I'm not sure how to exclude... (3 Replies)
Discussion started by: pathunkathunk
3 Replies

8. Shell Programming and Scripting

Filter file by length, looking only at lines that don't begin with ">"

I have a file that stores data in pairs of lines, following this format: line 1: header (preceded by ">") line 2: sequence Example.txt: >seq1 name GATTGATGTTTGAGTTTTGGTTTTT >seq2 name TTTTCTTC I want to filter out the sequences and corresponding headers for all sequences that are less... (2 Replies)
Discussion started by: pathunkathunk
2 Replies

9. Shell Programming and Scripting

Filter all the lines with minimum specified length of words of a text file

Hi Can someone tell me which script will work best (in terms of speed and simplicity to write and run) for a large text file to filter all the lines with a minimum specified length of words ? A sample script with be definitely of great help !!! Thanks in advance. :) (4 Replies)
Discussion started by: my_Perl
4 Replies
mlib_SignalLimit(3MLIB) 				    mediaLib Library Functions					   mlib_SignalLimit(3MLIB)

NAME
mlib_SignalLimit, mlib_SignalLimit_S16_S16, mlib_SignalLimit_S16S_S16S, mlib_SignalLimit_S16, mlib_SignalLimit_S16S, mlib_Signal- Limit_F32_F32, mlib_SignalLimit_F32S_F32S, mlib_SignalLimit_F32, mlib_SignalLimit_F32S - signal hard limiting SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ] #include <mlib.h> mlib_status mlib_SignalLimit_S16_S16(mlib_s16 *dst, const mlib_s16 *src, const mlib_s16 *low, const mlib_s16 *high, mlib_s32 n); mlib_status mlib_SignalLimit_S16S_S16S(mlib_s16 *dst, const mlib_s16 *src, const mlib_s16 *low, const mlib_s16 *high, mlib_s32 n); mlib_status mlib_SignalLimit_S16(mlib_s16 *srcdst, const mlib_s16 *low, const mlib_s16 *high, mlib_s32 n); mlib_status mlib_SignalLimit_S16S(mlib_s16 *srcdst, const mlib_s16 *low, const mlib_s16 *high, mlib_s32 n); mlib_status mlib_SignalLimit_F32_F32(mlib_f32 *dst, const mlib_f32 *src, const mlib_f32 *low, const mlib_f32 *high, mlib_s32 n); mlib_status mlib_SignalLimit_F32S_F32S(mlib_f32 *dst, const mlib_f32 *src, const mlib_f32 *low, const mlib_f32 *high, mlib_s32 n); mlib_status mlib_SignalLimit_F32(mlib_f32 *srcdst, const mlib_f32 *low, const mlib_f32 *high, mlib_s32 n); mlib_status mlib_SignalLimit_F32S(mlib_f32 *srcdst, const mlib_f32 *low, const mlib_f32 *high, mlib_s32 n); DESCRIPTION
Each of these functions performs hard limiting. For monaural signals, the following equation is used: dst[i] = low[0] if src[i] < low[0] dst[i] = src[i] if low[0] <= src[i] < high[0] dst[i] = high[0] if src[i] >= high[0] where i = 0, 1, ..., (n - 1). For stereo signals, the following equation is used: dst[2*i] = low[0] if src[2*i] < low[0] dst[2*i] = src[2*i] if low[0] <= src[2*i] < high[0] dst[2*i] = high[0] if src[2*i] >= high[0] dst[2*i+1] = low[1] if src[2*i+1] < low[1] dst[2*i+1] = src[2*i+1] if low[1] <= src[2*i+1] < high[1] dst[2*i+1] = high[1] if src[2*i+1] >= high[1] where i = 0, 1, ..., (n - 1). PARAMETERS
Each of the functions takes some of the following arguments: dst Destination signal array. src Source signal array. srcdst Source and destination signal array. low Lower input limit. In the stereo version, low[0] contains the lower limit for channel 0, and low[1] contains the lower limit for channel 1. high Upper input limit. In the stereo version. high[0] contains the upper limit for channel 0, and high[1] contains the upper limit for channel 1. n Number of samples in the source signal array. RETURN VALUES
Each of the functions returns MLIB_SUCCESS if successful. Otherwise it returns MLIB_FAILURE. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
attributes(5) SunOS 5.10 10 Nov 2004 mlib_SignalLimit(3MLIB)
All times are GMT -4. The time now is 07:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy