Sponsored Content
Top Forums Programming Joining Columnar heading from 2 lines Post 303041829 by ramkrix on Wednesday 4th of December 2019 08:05:49 PM
Old 12-04-2019
Joining Columnar heading from 2 lines

Hi,
Below is the format of a report generated by a custom reporting solution. I opened the report in Notepad++ and junked data and values as in the image below.

Joining Columnar heading from 2 lines-source_reportpng

I want to convert the values to a PIPE delimited format as below

Joining Columnar heading from 2 lines-targetpng

But there are challenges in getting this as the column heading itself is spread across two lines. There are lot of reports like this covering different subjects. I tried writing a program in Python to get this done. But not able to. Is there any way to handle this?

Thanks,
Ramkrix
Joining Columnar heading from 2 lines-source_reportpng
Joining Columnar heading from 2 lines-targetpng
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Joining 2 lines in a file together

Hi guys, I've got a log file which has entries that look like this: ------------------------------------------------------------------------------- 06/08/04 07:57:57 AMQ9002: Channel program started. EXPLANATION: Channel program 'INSCCPQ1.HSMTSPQ1' started. ACTION: None. ... (3 Replies)
Discussion started by: m223464
3 Replies

2. Shell Programming and Scripting

Joining lines from two files - please help

Hello, I have 2 files say File 1 has ABC DEF GHI File 2 has 123 456 789 I need output as ABC 123 DEF 456 GHI 789 I tried awk and sed but not able to get it in the right way. :confused: Please help. Thanks (25 Replies)
Discussion started by: chandra004
25 Replies

3. UNIX for Dummies Questions & Answers

Conditionally joining lines in vi

I've done this before but I can't remember how. Too long away from vi. I want to do a search are replace, but I want the replace to be a join. Example see spot run see spot walk see spot run fast see spot hop %s/run$/<somehow perform a join with the next line>/g so the results... (0 Replies)
Discussion started by: ifermon
0 Replies

4. Shell Programming and Scripting

joining 2 lines into single one

i have a script that joins 2 lines of a file into one line and again next 2 line into one line. if number of line is 4 then after joining it should be 2 lines in a file my file a1.txt has some of the below lines 1-GH32X, CC, AMR, Number of Intervals Not Inserted: 1 / 95 1-150KP1, CC,... (3 Replies)
Discussion started by: ali560045
3 Replies

5. Shell Programming and Scripting

joining two lines

Hi , I want to join two lines in a file, where the second line contain query string. if it doesn't contain that string i don't want to join e.g. Input file is as following: name fame game none none none name fame game cat eat mice I need output file as name fame game none none... (2 Replies)
Discussion started by: ashrafonics
2 Replies

6. Shell Programming and Scripting

Need help joining lines

Hi All, I need the command to join 2 lines into one. I found lots of threads but none give me the sollution. Probably because unix scripting is one of my best features ;) I got a logfile where line 2 needs to be joined with line 1, lines 4 needs to be joined with line 3 etc If you need... (16 Replies)
Discussion started by: rene21976
16 Replies

7. Shell Programming and Scripting

pattern matching lines using the date, and then joining the lines

Hi Guys, Was trying to attempt the below using awk and sed, have no luck so far, so any help would be appreciated. Current Text File: The first line has got an "\n", and the second line has got spaces/tabs then the word and "\n" TIME SERVER/CLIENT TEXT... (6 Replies)
Discussion started by: eo29
6 Replies

8. Shell Programming and Scripting

Joining broken lines

I have a plain test file with a delimeter ''. In this file some lines are broken into two. The first part of these broken line will have 6 columns and the second part will have 4. These broken lines will be consicutive. I want to join the two consicutive lines which are having 6 fields and 4... (8 Replies)
Discussion started by: ratheeshjulk
8 Replies

9. Shell Programming and Scripting

Joining lines in different way

Hi all, I'm excited to the part of unix.com forum, and noob to it. I have an query, where I have an file and it contains data like this use thread when posting do no I was expecting the result as use thread thread when when posting posting do do no use thread when thread when... (6 Replies)
Discussion started by: Jose Nirmal
6 Replies

10. Shell Programming and Scripting

Joining broken lines and removing empty lines

Hi - I have req to join broken lines and remove empty lines but should NOT be in one line. It has to be as is line by line. The challenge here is there is no end of line/start of line char. thanks in advance Source:- 2003-04-34024|04-10-2003|Claims|Claim|01-13-2003|Air Bag:Driver;... (7 Replies)
Discussion started by: Jackceasar123
7 Replies
GPIVTOOLS(1)						      General Commands Manual						      GPIVTOOLS(1)

NAME
gpivtools - The PIV tool suite. DESCRIPTION
gpivtools is a set of command-line driven programs for the so-called Digital Particle Image Velocimetry (DPIV). It contains programs for image recording, processing and analysing (resulting into estimators of particle displacement, i.e. PIV data), PIV data validation programs and post-processing tools for manipulating and calculating (scalar) derivatives of the PIV data. Though the command-line driven tools are mainly intended for non-interactive processing, its outputs may directly be visualized in a graph- ical way with the aid of gnuplot. The parameters and options to be used for most of the gpivtools are provided by Libgpiv. They are subsequently searched in ./gpivrc at local directory, at $HOME/.gpivrc (hidden) or at the system-wide configuration file gpiv.conf, which is mostly found at /etc for UNIX-like operating systems. Each parameter is described by the process key: GENPAR (general parameters), CAM (camera settings), TRIG (trigger set- tings), IMG (image header), IMGPROC (image processing), PIV (piv interrogation), VALID (piv data validation) or POST (piv post processing) and the parameter name, separated by a dot (.), followed by its value. Some of the parameters are optional. The parameters may be defined in arbitrary order. Blank lines and comment (starting with a pound sign (#) at the first column) may be included in the parameter files. The parameters may be overruled by the command line options of each tool. Libgpiv provides default parameter values if they are not defined in one of the configuration files or by an option key at the command line. In case stdin and stdout is used, verbose output of the programs is suppressed in order to avoid contamination of the output data. If file- name is used for overruling stdin and stdout, the parameters are written to filename.par. By renaming this file to ./gpivrc or $HOME/.gpivrc, the parameters may directly be re-used for identic processing of other images and PIV data. The parameters defined in $HOME/.gpivrc and in /etc/gpiv.conf are also used by the Graphic User Interface program gpiv. The programs understand different image formats: Portable Network Graphics (filename.png), HDF5 (filename.hdf), raw binary data (file- name.r) that is accompanied by an ASCII header file (filename.h), and LaVision's (tm) uncompressed image format (filename.img). Other for- mats that use lossless compression (TIF, GIF, PGM, BMP) are converted to PNG on the fly. For interrogation of double-framed images using cross-correlation, the second image has to be concatenated after the first one, if this has not already been done by the recording camera. This might be performed by gpiv_combing. Image parameters are read from the header or from the configuration resources (containing the IMG key). GPIV-TOOLS COMMANDS Here is the complete list of available gpivtools programs. See their individual man pages for a more extended description. gpiv_aint Calculates mean image intensity at each interrogation area. This program uses the IMG, PIV and POST parameters. gpiv_combing Combines two images into one image file for cross-correlation. This program uses the IMG parameters. gpiv_errvec Searches the erroneous vectors in a PIV data file and eventually substitutes them with new values. This program uses the PIV and POST parameters. gpiv_fi-keyline Filters each line that starts with a keyword. This program does not use the parameter resources from Libgpiv. gpiv_hdf2piv Converts hdf5 PIV data (extension .hdf) to ASCII data. This program does not use the parameter resources from Libgpiv. gpiv_imgproc, gpiv_mktestimg, gpiv_smooth, gpiv_hilo, gpiv_clip, gpiv_fft, gpiv_invfft, gpiv_lowpass, gpiv_highpass, gpiv_getbit, gpiv_mktestimg (PIV) image processing programs. These programs use the IMGPROC parameters. gpiv_img2gpiv Depreciated: use gpiv_combing instead. Converts images into raw data (extension .r) format with the belonging ASCII header (exten- sion .h) or into hdf format (with extension .hdf). This program does not use the parameter resources from Libgpiv. gpiv_manipiv, gpiv_fasty, gpiv_flipx, gpiv_flipy, gpiv_revert, gpiv_rot90, gpiv_rot180 Simple data manipulation tool for PIV data. These programs use the POST parameters. gpiv_peaklck Tests PIV data on the so-called peak-locking effect by printing/displaying an histogram of the particle displacements at sub-pixel level. This program uses the VALID parameters. gpiv_piv2gnuplt Converts PIV data gnuplot data. Besides this, image interrogation and post-processing programs are able to display their results directly (mostly with the -g option). This program does not use the parameter resources from Libgpiv. gpiv_piv2grid Converts PIV data to grid data for generating contour plots with Plotmtv. This program does not use the parameter resources from Libgpiv. gpiv_piv2hdf Converts ASCII PIV data to hdf5 formatted data (extension .hdf). This program does not use the parameter resources from Libgpiv. gpiv_piv2vec Adds header to PIV data for a vector plot with Plotmtv. This program does not use the parameter resources from Libgpiv. gpiv_process-chain Processes a pipeline of Gpiv-tool command's, forming process a chain from image recording, image processing, image interrogation, data validation, data post-processing. This program does not use the parameter resources from Libgpiv. gpiv_recimg captures images from a IIDC-compliant CCD camera with IEE1394 connection. This program uses the IMG parameters. gpiv_rr Interrogates images in order to obtain displacement estimators of particles for (Digital) Particle Image Velocimetry. This program uses the PIV and VALID parameters. gpiv_sca2gri Converts scalar data from gpiv to grid data for contour plotting with Plotmtv This program does not use the parameter resources from Libgpiv. gpiv_scale Spatial and time scaling program for PIV data. This program uses the IMG and POST parameters. gpiv_series Script for (parallel) processing a series of numbered files. This program does not use the parameter resources from Libgpiv. gpiv_suta Subtracts time-avaraged velocities (local mean) from the PIV estimators. This program does not use the parameter resources from Libgpiv. gpiv_s-avg Spatial statistics of PIV data. This program uses the POST parameters. gpiv_t-avg Calculates time-avaraged mean and rms from a series of PIV data. This program does not use the parameter resources from Libgpiv. gpiv_t-avg-img Calculates time-averaged values from a series of images at each pixel. This program uses the GENPAR parameters. gpiv_t-corr Calculates the velocity correlation as function of time (Eulerian correlation) from a series PIV data sets This program does not use the parameter resources from Libgpiv. gpiv_trig Triggers a (double Nd_YAGG) laser on a CCD camera. This program uses the TRIG parameters. gpiv_uhisto Tests PIV data by printing/displaying an histogram of the horizontal particle displacements. This program uses the VALID parame- ters. gpiv_vhisto Tests PIV data by printing/displaying an histogram of the vertical particle displacements. This program uses the VALID parameters. gpiv_vorstra, gpiv_vorty, gpiv_nstrain, gpiv_sstrain Calculates the differential quantities vorticity, shear strain and normal strain from PIV data. These programs use the POST parame- ters. SEE ALSO
gpiv, gpiv_control AUTHOR
Gerber Van der Graaf 26 March 2008 GPIVTOOLS(1)
All times are GMT -4. The time now is 10:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy