Sponsored Content
Top Forums Shell Programming and Scripting printing between two expressions using AWK Post 302297841 by pauli on Monday 16th of March 2009 12:09:34 AM
Old 03-16-2009
MySQL

Hi the output would be something like,

ABBA 44 44 44 44 44
L -.02 2.01 3.6
P 6.2 3.2 56 22.8
J 2.5 2.2 3.3
ACCA 44 44 44 44 44
AJJA 44 44 44 44 44
L 2.2 .2.0 2.2
P 3.3 3.2 3.3
J 2.2 .2.2 3.9
DFT 44 44 44 44 44
ABBA 44 44 44 44 44
J 3.3 2.2 2.2
P 6.8 -1.5 5.8
J-.32 .25 .32
ACCA 44 44 44 44 44

Where here, for example, I need to print whats between the second occurrence of ABBA and ACCA. I Guess Awk/Shell.

Many Thanks.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

AWK printing

Hello, I am trying to write a formatted report into a file using .ksh script and awk. Here is the command I am trying to run echo "before awk" ${SRC_SCHEMA} echo | awk '{printf "%-20s", ${SRC_SCHEMA} }' >>$REPORT_SQL_NAME I get the following error before awk ADW awk: 0602-562 Field $()... (1 Reply)
Discussion started by: fastgoon
1 Replies

2. Shell Programming and Scripting

Awk regular expressions

Hi Experts, Can you please help me out for the below scenario, I have a variable length file with the fixed number of columns, in which the fields are delimited by pipe symbol (|). From that file I have to extract the lines which has the following scenario, The field1 in a... (1 Reply)
Discussion started by: chella
1 Replies

3. Shell Programming and Scripting

AWK Printing

i have a file and i want to print the second variable and add qoutes to it i do awk -F"|" '{print $2}' star.unl. i get the output xxxxxxx but i need the variable($2) to be in quotes.like "xxxxxxx" how do i do there please (3 Replies)
Discussion started by: tomjones
3 Replies

4. Shell Programming and Scripting

Handling regular expressions in awk

Script is: accept filename as argument(also handle CTRL+C).to check whether th file exist in the current directory,it it then using awk find the employees who are either born in 1990 or drawing a salary greater than 25000. In my database file 1st field is of id ,2nd field is name,5th field is of... (5 Replies)
Discussion started by: Priyanka Bhati
5 Replies

5. Shell Programming and Scripting

Test Regular Expressions on Arrays in Awk

How would I test for a suffix on an element in an array? e.g. testing for /$html/ of an element array (4 Replies)
Discussion started by: ROFL
4 Replies

6. Shell Programming and Scripting

Awk- How to extract duplicate expressions

How to extract duplicate expressions ? CD of c4 input c3 100 120 TF03_X2 + AABDDAAABDDBCBACDBBC c4 100 120 TF03_X3 + AABCDAAABDDBCBACDBBC Script awk '{ for(i=1; i<=NF; i++) if($5 == "+" && $6 ~/CD/) {print index($6,... (11 Replies)
Discussion started by: bumblebee_2010
11 Replies

7. Shell Programming and Scripting

Problems with reg.-expressions in a awk-search-pattern

Hi, i have some problems with regular expressions in a awk search pattern. what i want to do: i want to calculate the mean-value in the time from 00:00 to 06:00 how my data looks like: .... 04/01/13-01:40 670992 54802 80711 116460 156177 04/01/13-01:50 703725 60150 85498 ... (3 Replies)
Discussion started by: IMPe
3 Replies

8. Shell Programming and Scripting

Assistance required with awk and regular expressions

Hello there, I am trying to get my head around the section below of a script we use that incorporates AWK and Regular Expressions. { match($0,"The broker*");print $1,$2,$3 ":", substr($0, RSTART,RLENGTH)} I have a basic understanding of how match works, what I am struggling with is the... (2 Replies)
Discussion started by: jimbojames
2 Replies

9. Shell Programming and Scripting

awk expressions

when I use Input command | awk '$2~/::/' 300 12:3:0 FC 15 normal 559104 525312 6:6:1* 7:6:1 600 301 12:3:1 FC 15 normal 559104 525312 6:6:1 7:6:1* 600 302 12:3:2 FC 15 normal 559104 524288 6:6:1* 7:6:1 600 303 12:3:3 FC 15... (12 Replies)
Discussion started by: vishalgoyal
12 Replies

10. Shell Programming and Scripting

awk or sed or python for regular expressions ?

Linux 6.X environments (RHEL, Oracle Linux ) I could write basic shell scripts in bash. In my spare time, I was planning to learn awk or sed to deal with regular expression tasks I have to deal with. But, I gather that python is gaining popularity these days and I came to know that python has a... (5 Replies)
Discussion started by: John K
5 Replies
mlib_ImageFourierTransform(3MLIB)			    mediaLib Library Functions				 mlib_ImageFourierTransform(3MLIB)

NAME
mlib_ImageFourierTransform - Fourier transform SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ] #include <mlib.h> mlib_status mlib_ImageFourierTransform(mlib_image *dst, const mlib_image *src, mlib_fourier_mode mode); DESCRIPTION
The mlib_ImageFourierTransform() function performs a two-dimensional Fourier transformation. The source and destination images must be the same type and the same size. The data type of the images can be MLIB_BYTE, MLIB_SHORT, MLIB_USHORT, MLIB_INT, MLIB_FLOAT, or MLIB_DOUBLE. The height and width of the images must be some positive power of 2 (but they do not have to be equal). They can have 1 or 2 channels. If the source image has just one channel the imaginary parts are assumed to be zero. If the destination image has just one channel, then it is assumed that the imaginary parts of the output can be discarded. But in case both source and desti- nation images are one-channel images, then MLIB_FAILURE is returned. The predefined modes used in the image Fourier transform function are as follows: Mode Description ---------------------------------------------------------------------- MLIB_DFT_SCALE_NONE Forward DFT without scaling MLIB_DFT_SCALE_MXN Forward DFT with scaling of 1/(M*N) MLIB_DFT_SCALE_SQRT Forward DFT with scaling of 1/sqrt(M*N) MLIB_IDFT_SCALE_NONE Inverse DFT without scaling MLIB_IDFT_SCALE_MXN Inverse DFT with scaling of 1/(M*N) MLIB_IDFT_SCALE_SQRT Inverse DFT with scaling of 1/sqrt(M*N) PARAMETERS
The function takes the following arguments: dst Pointer to destination image. src Pointer to source image. mode Mode of the transform. RETURN VALUES
The function 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 |Committed | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
attributes(5) SunOS 5.11 2 Mar 2007 mlib_ImageFourierTransform(3MLIB)
All times are GMT -4. The time now is 03:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy