Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Combine multi-row cell into a single line Post 303025312 by Kim Ashby on Tuesday 30th of October 2018 12:51:06 PM
Old 10-30-2018
Combine multi-row cell into a single line

My CSV file looks similar to this example (the K, L, and M are in the same cell as J but each on a new line within that cell):

Code:
1,  A,  B,  C,  D
2,  E,  F,  G,  H
3,  I,   J  N,  O,
          K
          L
          M,
4,  P,   Q,  R,  S

I would like to have it look like this:

Code:
1,  A,  B,  C,  D
2,  E,  F,  G,  H
3,  I,   J K L M,  N,  O
4,  P,   Q,  R,  S

Any ideas on how I can reformat that multi-line cell?




Moderator's Comments:
Mod Comment Please use CODE tags as required by forum rules!

Last edited by RudiC; 10-31-2018 at 08:46 AM.. Reason: Added CODE tags.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to use Perl to merge multi-line into single line

Hi, Can anyone know how to use perl to merge the following multi-line information which beginning with "BAM" into one line. For each line need to delete the return and add a space. Please see the red color line. ******Org. Multi-line) BAM admin 101.203.57.22 ... (3 Replies)
Discussion started by: happyday
3 Replies

2. Shell Programming and Scripting

How to use Perl to join multi-line into single line

Hello, Did anyone know how to write a perl script to merge the multi-line into a single line where each line with start at timestamp Input--> timestamp=2009-11-10-04.55.20.829347; a; b; c; timestamp=2009-11-10-04.55.20.829347; aa; bb; cc; (5 Replies)
Discussion started by: happyday
5 Replies

3. Shell Programming and Scripting

Combine multiple lines in single line

This is related to one of my previous post but now with a slight difference: I need the "Updated:" to be in one line as well as the "Information:" on one line as well. These are in multiple lines right now as seen below. These can have 2 or more lines that needs to be in one line. System name:... (8 Replies)
Discussion started by: The One
8 Replies

4. Shell Programming and Scripting

Transpose multi-line records into a single row

Now that I've parsed out the data that I desire I'm left with variable length multi-line records that are field seperated by new lines (\n) and record seperated by a single empty line ("") At first I was considering doing something like this to append all of the record rows into a single row: ... (4 Replies)
Discussion started by: daveyabe
4 Replies

5. Shell Programming and Scripting

Merge multi-line output into a single line

Hello I did do a search and the past threads doesn't really solve my issue. (using various awk commands) I need to combine the output from java -version into 1 line, but I am having difficulties. When you exec java -version, you get: java version "1.5.0_06" Java(TM) 2 Runtime... (5 Replies)
Discussion started by: flagman5
5 Replies

6. Shell Programming and Scripting

Multi lines to single line

HI, My input file contains the data as like below: A1234119993 B6271113 Bghjkjk A1234119992 B6271113hi Bghjkjkmkl the output i require is : A1234119993 B6271113 Bghjkjk A1234119992 B6271113hi Bghjkjkmkl Please help me in this. Thanks (6 Replies)
Discussion started by: pandeesh
6 Replies

7. Shell Programming and Scripting

Joining multi-line output to a single line in a group

Hi, My Oracle query is returing below o/p ---------------------------------------------------------- Ins trnas value a lkp1 x a lkp1 y b lkp1 a b lkp2 x b lkp2 y ... (7 Replies)
Discussion started by: gvk25
7 Replies

8. UNIX for Dummies Questions & Answers

Remove multi line and single line comments

Hi, I am trying to remove multi line and single line comments like examples below I have tried this pattern. it works fine for single line comments and multi line comments in a single line only. but this fails when the comments are extended in multiple lines as shown in the comment 2 of... (3 Replies)
Discussion started by: ahmedwaseem2000
3 Replies

9. Shell Programming and Scripting

Help with reformat single-line multi-fasta into multi-line multi-fasta

Input File: >Seq1 ASDADAFASFASFADGSDGFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSD >Seq2 SDASDAQEQWEQeqAdfaasd >Seq3 ASDSALGHIUDFJANCAGPATHLACJHPAUTYNJKG ...... Desired Output File >Seq1 ASDADAFASF ASFADGSDGF SDFSDFSDFS DFSDFSDFSD FSDFSDFSDF SD >Seq2 (4 Replies)
Discussion started by: patrick87
4 Replies

10. Shell Programming and Scripting

Multi line log files to single line format

I want to read the log file which was generate from other command . And the output was having multi line in log files for job name and server name. But i need to make all the logs on one line Source file 07/15/2018 17:02:00 TRANSLOG_1700 Server0005_SQL ... (2 Replies)
Discussion started by: ranjancom2000
2 Replies
mlib_VideoColorJFIFYCC2RGB420_Nearest(3MLIB)		    mediaLib Library Functions		      mlib_VideoColorJFIFYCC2RGB420_Nearest(3MLIB)

NAME
mlib_VideoColorJFIFYCC2RGB420_Nearest - JFIF YCbCr to RGB color conversion SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ] #include <mlib.h> mlib_status mlib_VideoColorJFIFYCC2RGB420_Nearest(mlib_u8 *rgb0, mlib_u8 *rgb1, const mlib_u8 *y0, const mlib_u8 *y1, const mlib_u8 *cb, const mlib_u8 *cr, mlib_s32 n); DESCRIPTION
The mlib_VideoColorJFIFYCC2RGB420_Nearest() function performs color space conversion from YCbCr to RGB together with sampling rate conver- sion when used in the JPEG File Interchange Format (JFIF). PARAMETERS
The function takes the following arguments: rgb0 Pointer to upper destination RGB multi-component row. rgb0 must be 8-byte aligned. rgb1 Pointer to lower destination RGB multi-component row. rgb1 must be 8-byte aligned. y0 Pointer to upper destination Y component row. y0 must be 8-byte aligned. y1 Pointer to lower destination Y component row. y1 must be 8-byte aligned. cb Pointer to source Cb component row. cb must be 8-byte aligned. cr Pointer to source Cr component row. cr must be 8-byte aligned. n Length of Y component row. The length of Cb and Cr component rows must be n. The length of the RGB multi-component row must be 3*n. 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 |Evolving | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
mlib_VideoColorJFIFYCC2RGB420(3MLIB), mlib_VideoColorJFIFYCC2RGB422(3MLIB), mlib_VideoColorJFIFYCC2RGB422_Nearest(3MLIB), attributes(5) SunOS 5.10 9 Nov 2004 mlib_VideoColorJFIFYCC2RGB420_Nearest(3MLIB)
All times are GMT -4. The time now is 09:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy