Sponsored Content
Full Discussion: awk to parse multiple lines
Top Forums Shell Programming and Scripting awk to parse multiple lines Post 302939306 by Corona688 on Tuesday 24th of March 2015 02:16:31 PM
Old 03-24-2015
Please show the input you have and the output you want. I have no idea what you're trying to do without an example.

Wait a minute... Is this in Windows again?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

parse multiple lines? should be a easy answer...

inputfile: A B C D E F G H 1 2 3 4 ----------- I want to read these and put them into a variable: file=../inputfile col2line1=`cat $file | awk '{print $2}'` how do i extract row 2's E,F,G,H or row 3's 1,2,3,4??? I tried the search, didn't get much, maybe i suck at searching too... (4 Replies)
Discussion started by: DeuceLee
4 Replies

2. Shell Programming and Scripting

awk/sed Command : Parse parameter file / send the lines to the ksh export command

Sorry for the duplicate thread this one is similar to the one in https://www.unix.com/shell-programming-scripting/88132-awk-sed-script-read-values-parameter-files.html#post302255121 Since there were no responses on the parent thread since it got resolved partially i thought to open the new... (4 Replies)
Discussion started by: rajan_san
4 Replies

3. Shell Programming and Scripting

Awk to Break lines to multiple lines.

Input File: nawk -F "|" '{ for(i=1;i<=NF;i++) { if (i == 2) {gsub(",","#",$i);z=split($i,a,"")} else if (i == 3) {gsub(",","#",$i);z=split($i,b,"")} } if(z > 0) for(i=1;i<=z;i++) print $1,a,"Test"; if(w > 0) for(j=1;j<=w;j++) ... (1 Reply)
Discussion started by: pinnacle
1 Replies

4. Shell Programming and Scripting

Need to parse file "x" lines at a time ... awk array?

I have files that store multiple data points for the same device "vertically" and include multiple devices. It repeats a consistant pattern of lines where for each line: Column 1 is a common number for the entire file and all devices in that file Column 2 is a unique device number Column 3 is... (7 Replies)
Discussion started by: STN
7 Replies

5. Emergency UNIX and Linux Support

[Solved] AWK to parse adjacent matching lines

Hi, I have an input file like F : 0.1 : 0.002 P : 0.3 : 0.004 P : 0.5 : 0.008 P : 0.1 : 0.005 L : 0.05 : 0.02 P: 0.1 : 0.006 P : 0.01 : 0.08 F : 0.02 : 0.08 Expected output: (2 Replies)
Discussion started by: vasanth.vadalur
2 Replies

6. Shell Programming and Scripting

Awk match multiple columns in multiple lines in single file

Hi, Input 7488 7389 chr1.fa chr1.fa 3546 9887 chr5.fa chr9.fa 7387 7898 chrX.fa chr3.fa 7488 7389 chr21.fa chr3.fa 7488 7389 chr1.fa chr1.fa 3546 9887 chr9.fa chr5.fa 7898 7387 chrX.fa chr3.fa Desired Output 7488 7389 chr1.fa chr1.fa 2 3546 9887 chr5.fa chr9.fa 2... (2 Replies)
Discussion started by: jacobs.smith
2 Replies

7. Shell Programming and Scripting

awk : Filter a set of data to parse header line and last field of multiple same match.

Hi Experts, I have a data with multiple entry , I want to filter PKG= & the last column "00060110" or "00088150" in the output file: ############################################################################################### PKG= P8SDB :: VGS = vgP8SOra vgP8SDB1 vgP8S001... (5 Replies)
Discussion started by: rveri
5 Replies

8. Shell Programming and Scripting

awk Parse And Create Multiple Files Based on Field Value

Hello: I am working parsing a large input file which will be broken down into multiples based on the second field in the file, in this case: STORE. The idea is to create each file with the corresponding store number, for example: Report_$STORENUM_$DATETIMESTAMP , and obtaining the... (7 Replies)
Discussion started by: ec012
7 Replies

9. Shell Programming and Scripting

Using awk to parse multiple conditions

There are 4 ways the user can input data and unfortunately the parse rules for each are slightly different. The first condition works great and the input file is attached for the second condition. Conditions 3 and 4 will follow I'm sure I will have trouble with them and need help as well. The... (9 Replies)
Discussion started by: cmccabe
9 Replies

10. Shell Programming and Scripting

Merging multiple lines to columns with awk, while inserting commas for missing lines

Hello all, I have a large csv file where there are four types of rows I need to merge into one row per person, where there is a column for each possible code / type of row, even if that code/row isn't there for that person. In the csv, a person may be listed from one to four times... (9 Replies)
Discussion started by: RalphNY
9 Replies
RA_BMP(1)						      General Commands Manual							 RA_BMP(1)

NAME
ra_bmp - convert RADIANCE picture to/from Windows BMP image SYNOPSIS
ra_bmp [ -b ][ -g gamma ][ -e spec ][ -p xr yr xg yg xb yb xw yw ] [ [ input|- [ output ] ] ra_bmp -r [ -g gamma ][ -e +/-stops ] [ [ input|- [ output ] ] DESCRIPTION
Ra_bmp converts between RADIANCE and a Windows BMP image. During forward conversion, the -b option produces 8-bit grayscale output rather than 24-bit RGB. The -g option specifies the exponent used in monitor gamma correction; the default value is 2.2. The -e option specifies a tone-mapping method or exposure compensation. If the argument is one of the special words "auto", "human", or "linear", the image will be tone-mapped with histogram adjustment, human vision simulation, or an averaged linear exposure, respectively. (These words may be abbreviated by one or more letters.) Otherwise, the exposure specification is interpreted as a linear compensation value in integer f- stops, which must be proceeded by a '+' or '-'. The CRT color output primaries may be specified with the -p option. The -r option invokes a reverse conversion, from a Windows BMP image to a RADIANCE picture. Tone-mapping and monitor primaries are not supported for reverse conversion. Ra_bmp can accept 16-bit or color-mapped BMP files on input, but cannot not produce them on output. A hyphen ('-') may be specified to indicate standard input for either forward or reverse conversion so that an output file may be speci- fied. If the BMP input is taken from the standard input or sent to the standard output without tone-mapping, then the scanlines may be reversed from their usual ordering. Reversed scanlines sometimes causes difficulties for programs attempting to interpret the resulting RADIANCE picture or BMP image, which may be rejected or displayed inverted. AUTHOR
Greg Ward SEE ALSO
pfilt(1), ra_ppm(1), ra_pr(1), ra_pr24(1), ra_t8(1), ra_t16(1), ra_tiff(1), ximage(1) RADIANCE
3/25/04 RA_BMP(1)
All times are GMT -4. The time now is 02:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy