Sponsored Content
Top Forums Shell Programming and Scripting Joining multi-line output to a single line in a group Post 302605225 by gvk25 on Wednesday 7th of March 2012 02:55:18 AM
Old 03-07-2012
MySQL Joining multi-line output to a single line in a group

Hi,

My Oracle query is returing below o/p

Code:
---------------------------------------------------------- 
Ins    trnas             value 
a      lkp1               x 
a      lkp1               y 
b      lkp1               a 
b      lkp2               x 
b      lkp2               y 
------------------------------------ 
now I want to convert this o/p  to  below o/p using perl script
 
ins trans    value 
a   lkp1       xy 
b   lkp1       a 
b   lkp2       xy


Thanks
gvk25
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Joining lines to single line in VI

Dear friends, In VI, I have these data shown below: Line1 Line2 Line3 Line4 How can I JOIN these line to the first line? When I finished I should have: Line1 Line2 Line3 Line4 is there a text length limit of how long a single line can be in VI? Thank you much! (10 Replies)
Discussion started by: bobo
10 Replies

2. Shell Programming and Scripting

Multi-line output to single line

Hello, How can I take the following output: outputa outputb outputc and turn it into single line ouput, with a single space between each field like below: outputa outputb outputc (7 Replies)
Discussion started by: LinuxRacr
7 Replies

3. Shell Programming and Scripting

awk help required to group output and print a part of group line and original line

Hi, Need awk help to group and print lines to format the output as shown below INPUT FORMAT set echo on set heading on set spool on /* SCHEMA1 */ CREATE TABLE T1; /* SCHEMA1 */ CREATE TABLE T2; /* SCHEMA1 */ CREATE TABLE T3; /* SCHEMA1 */ CREATE TABLE T4; /* SCHEMA1 */ CREATE TABLE T5;... (5 Replies)
Discussion started by: rajan_san
5 Replies

4. 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

5. 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

6. 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

7. Shell Programming and Scripting

joining multi-line file into single lines

Hi, I have a file like mentioned below..For each specific id starting with > I want to join the sequence in multiple lines to a single line..Is there a simple way in awk or sed to do this >ENST00000558922 cdna:KNOWN TCCAGGATCCAGCCTCCCGATCACCGCGCTAGTCCTCGCCCTGCCTGGGCTTCCCCAGAG... (2 Replies)
Discussion started by: Diya123
2 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
DBIx::Class::Manual::DocMap(3)				User Contributed Perl Documentation			    DBIx::Class::Manual::DocMap(3)

NAME
DBIx::Class::Manual::DocMap - What documentation do we have? Manuals DBIx::Class::Manual - User's Manual overview. DBIx::Class::Manual::QuickStart - Up and running with DBIC in 10 minutes. DBIx::Class::Manual::Intro - More detailed introduction to setting up and using DBIx::Class. DBIx::Class::Manual::SQLHackers - How to use DBIx::Class if you know SQL (external, available on CPAN) DBIx::Class::Manual::Joining - Joining tables with DBIx::Class. DBIx::Class::Manual::Features - A boatload of DBIx::Class features with links to respective documentation. DBIx::Class::Manual::Glossary - What do all those terms mean? DBIx::Class::Manual::Cookbook - Various short recipes on how to do things. DBIx::Class::Manual::FAQ - Frequently Asked Questions, gathered from IRC and the mailing list. DBIx::Class::Manual::Troubleshooting - What to do if things go wrong (diagnostics of known error messages). Some essential reference documentation The first two list items are the most important. "search" in DBIx::Class::ResultSet - Selecting and manipulating sets. The DSL (mini-language) for query composition is only partially explained there, see "WHERE CLAUSES" in SQL::Abstract for the complete details. $schema::Result::$resultclass - Classes representing a single result (row) from a DB query. Such classes normally subclass DBIx::Class::Core, the methods inherited from DBIx::Class::Row and DBIx::Class::Relationship::Base are used most often. DBIx::Class::ResultSetColumn - Perform operations on a single column of a ResultSet. DBIx::Class::ResultSource - Source/Table definition functions. DBIx::Class::Schema - Overall sources, and connection container. DBIx::Class::Relationship - Simple relationship declarations. DBIx::Class::Relationship::Base - Relationship declaration details. DBIx::Class::InflateColumn - Making objects out of your column values. perl v5.18.2 2014-01-05 DBIx::Class::Manual::DocMap(3)
All times are GMT -4. The time now is 03:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy