Sponsored Content
Full Discussion: Data from table to column
Top Forums UNIX for Advanced & Expert Users Data from table to column Post 302415564 by Nila on Friday 23rd of April 2010 12:07:02 AM
Old 04-23-2010
Try this,

Code:
sed -re "/^$/d; s/[ ]{2,}/\n/g"  test_file

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

file in to the column of the table

Hi I am ETL person. I have a table in Oracle having one of its column defined as BLOB where it can hold huge data. When i generate a file in DataStage and place it in a path. and i would like dump the file in to the column of the table having datatype as BLOB. (0 Replies)
Discussion started by: sant_leo
0 Replies

2. Shell Programming and Scripting

Extract data based on match against one column data from a long list data

My input file: data_5 Ali 422 2.00E-45 102/253 140/253 24 data_3 Abu 202 60.00E-45 12/23 140/23 28 data_1 Ahmad 256 7.00E-45 120/235 140/235 22 data_4 Aman 365 8.00E-45 15/65 140/65 20 data_10 Jones 869 9.00E-45 65/253 140/253 18... (12 Replies)
Discussion started by: patrick87
12 Replies

3. UNIX for Dummies Questions & Answers

average of a column in a table

Hello, Is there a quick way to compute the average of a column data in a numerical tab delimeted file? Thanks, Gussi (2 Replies)
Discussion started by: Gussifinknottle
2 Replies

4. Shell Programming and Scripting

From column to table

Hi, I have an ascii file containing information. This file is n x m lines. Is there a way to generate an ascii file where the information is stored as n x m table instead? The m columns should be tab separated. Thanks a lot, Sarah (11 Replies)
Discussion started by: f_o_555
11 Replies

5. Shell Programming and Scripting

Construct 3 column table from one column list

Hi all! trying my best to parse a public site for information (ie fiscal year and turnover) about corporations. Doing this by having a file with business name and registration number (search key) the file bolag.txt currently looks like this Burgundy 556732-7217 AcademicSearch 556406-9879... (11 Replies)
Discussion started by: martindebruin
11 Replies

6. Shell Programming and Scripting

Replace column that matches specific pattern, with column data from another file

Can anyone please help with this? I have 2 files as given below. If 2nd column of file1 has pattern foo1@a, find the matching 1st column in file2 & replace 2nd column of file1 with file2's value. file1 abc_1 foo1@a .... abc_1 soo2@a ... def_2 soo2@a .... def_2 foo1@a ........ (7 Replies)
Discussion started by: prashali
7 Replies

7. Shell Programming and Scripting

Compare 2 files and match column data and align data from 3 column

Hello experts, Please help me in achieving this in an easier way possible. I have 2 csv files with following data: File1 08/23/2012 12:35:47,JOB_5330 08/23/2012 12:35:47,JOB_5330 08/23/2012 12:36:09,JOB_5340 08/23/2012 12:36:14,JOB_5340 08/23/2012 12:36:22,JOB_5350 08/23/2012... (5 Replies)
Discussion started by: asnandhakumar
5 Replies

8. Shell Programming and Scripting

Split column data if the table has n number of column's

please write a shell script Table -------------------------- 1 2 3 a b c 3 4 5 c d e 7 8 9 f g h Output should be like this --------------- 1 2 3 3 4 5 7 8 9 a b c c d e f g h (1 Reply)
Discussion started by: Priti2277
1 Replies

9. Shell Programming and Scripting

Split column data if the table has n number of column's with some record

Split column data if the table has n number of column's with some record then how to split n number of colmn's line by line with records Table --------- Col1 col2 col3 col4 ....................col20 1 2 3 4 .................... 20 a b c d .................... v ... (11 Replies)
Discussion started by: Priti2277
11 Replies

10. Shell Programming and Scripting

Change data in one column with data from another file's column

Hello, I have this file outputData: # cat /tmp/outputData __Capacity^6^NBSC01_Licences^L3_functionality_for_ESB_switch __Capacity^2100^NBSC01_Licences^Gb_over_IP __Capacity^1837^NBSC01_Licences^EDGE_BSS_Fnc __Capacity^1816^NBSC01_Licences^GPRS_CS3_and_CS4... (1 Reply)
Discussion started by: nypreH
1 Replies
Test::Harness::Straps(3pm)				 Perl Programmers Reference Guide				Test::Harness::Straps(3pm)

NAME
Test::Harness::Straps - detailed analysis of test results SYNOPSIS
use Test::Harness::Straps; my $strap = Test::Harness::Straps->new; # Various ways to interpret a test my $results = $strap->analyze($name, @test_output); my $results = $strap->analyze_fh($name, $test_filehandle); my $results = $strap->analyze_file($test_file); # UNIMPLEMENTED my %total = $strap->total_results; # Altering the behavior of the strap UNIMPLEMENTED my $verbose_output = $strap->dump_verbose(); $strap->dump_verbose_fh($output_filehandle); DESCRIPTION
THIS IS ALPHA SOFTWARE in that the interface is subject to change in incompatible ways. It is otherwise stable. Test::Harness is limited to printing out its results. This makes analysis of the test results difficult for anything but a human. To make it easier for programs to work with test results, we provide Test::Harness::Straps. Instead of printing the results, straps provide them as raw data. You can also configure how the tests are to be run. The interface is currently incomplete. Please contact the author if you'd like a feature added or something change or just have comments. CONSTRUCTION
new() my $strap = Test::Harness::Straps->new; Initialize a new strap. $strap->_init; Initialize the internal state of a strap to make it ready for parsing. ANALYSIS
$strap->analyze( $name, @output_lines ) my $results = $strap->analyze($name, @test_output); Analyzes the output of a single test, assigning it the given $name for use in the total report. Returns the $results of the test. See Results. @test_output should be the raw output from the test, including newlines. my $results = $strap->analyze_fh($name, $test_filehandle); Like "analyze", but it reads from the given filehandle. $strap->analyze_file( $test_file ) my $results = $strap->analyze_file($test_file); Like "analyze", but it runs the given $test_file and parses its results. It will also use that name for the total report. Returns the full command line that will be run to test $file. Returns the command that runs the test. Combine this with "_switches()" to build a command line. Typically this is $^X, but you can set $ENV{HARNESS_PERL} to use a different Perl than what you're running the harness under. This might be to run a threaded Perl, for example. You can also overload this method if you've built your own strap subclass, such as a PHP interpreter for a PHP-based strap. Formats and returns the switches necessary to run the test. Returns only defined, non-blank, trimmed switches from the parms passed. local $ENV{PERL5LIB} = $self->_INC2PERL5LIB; Takes the current value of @INC and turns it into something suitable for putting onto "PERL5LIB". my @filtered_inc = $self->_filtered_INC; Shortens @INC by removing redundant and unnecessary entries. Necessary for OSes with limited command line lengths, like VMS. $self->_restore_PERL5LIB; This restores the original value of the "PERL5LIB" environment variable. Necessary on VMS, otherwise a no-op. Parsing Methods for identifying what sort of line you're looking at. my $is_diagnostic = $strap->_is_diagnostic($line, $comment); Checks if the given line is a comment. If so, it will place it into $comment (sans #). my $is_header = $strap->_is_header($line); Checks if the given line is a header (1..M) line. If so, it places how many tests there will be in "$strap->{max}", a list of which tests are todo in "$strap->{todo}" and if the whole test was skipped "$strap->{skip_all}" contains the reason. my $is_bail_out = $strap->_is_bail_out($line, $reason); Checks if the line is a "Bail out!". Places the reason for bailing (if any) in $reason. $strap->_reset_file_state; Resets things like "$strap->{max}" , "$strap->{skip_all}", etc. so it's ready to parse the next file. EXAMPLES
See examples/mini_harness.plx for an example of use. AUTHOR
Michael G Schwern "<schwern at pobox.com>", currently maintained by Andy Lester "<andy at petdance.com>". SEE ALSO
Test::Harness perl v5.10.0 2007-12-18 Test::Harness::Straps(3pm)
All times are GMT -4. The time now is 07:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy