Sponsored Content
Full Discussion: Data from table to column
Top Forums UNIX for Advanced & Expert Users Data from table to column Post 302415184 by Nila on Thursday 22nd of April 2010 02:07:43 AM
Old 04-22-2010
Try this,

Code:
sed -re "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
Jifty::Test(3pm)					User Contributed Perl Documentation					  Jifty::Test(3pm)

NAME
Jifty::Test - Jifty's test module SYNOPSIS
use Jifty::Test tests => 5; # to load po for test: # use Jifty::Test tests => 5, l10n => 1; # ...all of Test::More's functionality... my $model = MyApp::Model::MyModel->new; $model->create(); ok($model->id, 'model works'); is($model->foo, 'some default', 'default works'); # Startup an external server (see Jifty::TestServer) my $server = Jifty::Test->make_server; my $server_url = $server->started_ok; # You're probably also interested in Jifty::Test::WWW::Mechanize DESCRIPTION
Jifty::Test is a superset of Test::More. It provides all of Test::More's functionality in addition to the class methods defined below. METHODS
is_passing my $is_passing = Jifty::Test->is_passing; Check if the test is currently in a passing state. o All tests run so far have passed o We have run at least one test o We have not run more than we planned (if we planned at all) is_done my $is_done = Jifty::Test->is_done; Check if we have run all the tests we've planned. If the plan is 'no_plan' then is_done() will return true if at least one test has run. setup ARGS This method is passed a single argument. This is a reference to the array of parameters passed in to the import statement. Merges the "test_config" into the default configuration, resets the database, and resets the fake "outgoing mail" folder. This is the method to override if you wish to do custom setup work, such as insert test data into your database. package MyApp::Test; use base qw/ Jifty::Test /; sub setup { my $self = shift; my $args = shift; # Make sure to call the super-class version $self->SUPER::setup($args); # Now that we have the database and such... my %test_args = @$args; if ($test_arg{something_special}) { # do something special... } } And later in your tests, you may do the following: use MyApp::Test tests => 14, something_special => 1; # 14 tests with some special setup... setup_test_database Create the test database. This can be overloaded if you do your databases in a different way. load_test_configs FILENAME This will load all the test config files that apply to FILENAME (default: $0, the current test script file). Say you are running the test script "/home/bob/MyApp/t/user/12-delete.t". The files that will be loaded are: "/home/bob/MyApp/t/user/12-delete.t-config.yml" "/home/bob/MyApp/t/user/test_config.yml" "/home/bob/MyApp/t/test_config.yml" ..followed by the usual Jifty configuration files (such as "MyApp/etc/config.yml" and "MyApp/etc/site_config.yml"). The options in a more specific test file override the options in a less specific test file. The options are returned in a single hashref. test_config Returns a hash which overrides parts of the application's configuration for testing. By default, this changes the database name by appending a 'test', as well as setting the port to a random port between 10000 and 15000. Individual test configurations may override these defaults (see "load_test_configs"). It is passed the current configuration before any test config is loaded. You can override this to provide application-specific test configuration, e.g: sub test_config { my $class = shift; my ($config) = @_; my $hash = $class->SUPER::test_config($config); $hash->{framework}{LogConfig} = "etc/log-test.conf" return $hash; } Note that this is deprecated in favor of having real config files in your test directory. make_server Creates a new Jifty::TestServer depending on the value of $ENV{JIFTY_TEST_SERVER}. If the environment variable is "Inline", we run tests using PSGI inline without spawning an actual server. Otherwise, we fork off a Plack::Server to run tests against. web Like calling "<Jifty-"web>>. "<Jifty::Test-"web>> does the necessary Jifty->web initialization for it to be usable in a test. mailbox A mailbox used for testing mail sending. setup_mailbox Clears the mailbox. teardown_mailbox Deletes the mailbox. is_available Informs Email::Send that Jifty::Test is always available as a mailer. send Should not be called manually, but is automatically called by Email::Send when using Jifty::Test as a mailer. (Note that it is a class method.) messages Returns the messages in the test mailbox, as a list of Email::Simple objects. You may have to use a module like Email::MIME to parse multi-part messages stored in the mailbox. test_file my $files = Jifty::Test->test_file($file); Register $file as having been created by the test. It will be cleaned up at the end of the test run if and only if the test passes. Otherwise it will be left alone. It returns $file so you can do this: my $file = Jifty::Test->test_file( Jifty::Util->absolute_path("t/foo") ); test_in_isolation my $return = Jifty::Test->test_in_isolation( sub { ...your testing code... }); For testing testing modules so you can run testing code (which perhaps fail) without effecting the outer test. Saves the state of Jifty::Test's Test::Builder object and redirects all output to dev null before running your testing code. It then restores the Test::Builder object back to its original state. # Test that fail() returns 0 ok !Jifty::Test->test_in_isolation sub { return fail; }; SEE ALSO
Jifty::Test::WWW::Mechanize, Jifty::TestServer perl v5.14.2 2010-12-08 Jifty::Test(3pm)
All times are GMT -4. The time now is 09:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy