Sponsored Content
Full Discussion: Data in Rows to Columns
Top Forums Shell Programming and Scripting Data in Rows to Columns Post 302403823 by murugaperumal on Monday 15th of March 2010 12:26:03 AM
Old 03-15-2010
Code:
use strict;
use warnings;
my ($str,$str1);
open FH, "<file" or die "Can't Open $!";
while(<FH>)
{
    if(/([A-Z])\s+([0-9])/)
    {
        $str=$str." $1";
        $str1=$str1." $2";
    }
}
print "$str\n$str1\n";

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Search for & edit rows & columns in data file and pipe

Dear unix gurus, I have a data file with header information about a subject and also 3 columns of n rows of data on various items he owns. The data file looks something like this: adam peter blah blah blah blah blah blah car 01 30 200 02 31 400 03 57 121 .. .. .. .. .. .. n y... (8 Replies)
Discussion started by: tintin72
8 Replies

2. Shell Programming and Scripting

Transpose columns to Rows : Big data

Hi, I did read a few posts on the subjects, tried out a few solutions, but did not solve my problem. https://www.unix.com/302121568-post11.html https://www.unix.com/shell-programming-scripting/137953-large-file-columns-into-rows-etc-4.html Please help. Problem very similar to the second link... (15 Replies)
Discussion started by: genehunter
15 Replies

3. UNIX for Dummies Questions & Answers

Convert Rows to Columns Specific Data

I have this data M36 AREA INFORMATION MDN = 0485009346 ESN = H'15fda0b0 TYPE = HLR RESULT = NOK REASON = UNRECOGNIZED MIN COMPLETED AREA INFORMATION MDN = 0498044402 ESN = H'15fdac11 TYPE... (2 Replies)
Discussion started by: krabu
2 Replies

4. UNIX for Dummies Questions & Answers

Suggestion to convert data in rows to data in columns

Hello everyone! I have a huge dataset looking like this: nameX nameX 0 1 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 1 2 2 2 ............... nameY nameY 2 2 2 2 2 2 2 2 2 2 1 2 2 2 1 2 2 2 ..... nameB nameB 0 1 2 2 2 2 2 2 2 2 1 2 2 2 1 2 2 2 ..... (can be several thousands of codes) and I need... (8 Replies)
Discussion started by: kush
8 Replies

5. Shell Programming and Scripting

Help for a Perl newcomer! Transposing data from columns to rows

I have to create a Perl script which will transpose the data output from my experiment, from columns to rows, in order for me to analyse the data. I am a complete Perl novice so any help would be greatly appreciated. The data as it stands looks like this: Subject Condition Fp1 ... (12 Replies)
Discussion started by: Sarah_W
12 Replies

6. Shell Programming and Scripting

Transpose Data from Columns to rows

Hello. very new to shell scripting and would like to know if anyone could help me. I have data thats being pulled into a txt file and currently have to manually transpose the data which is taking a long time to do. here is what the data looks like. Server1 -- Date -- Other -- value... (7 Replies)
Discussion started by: Mikes88
7 Replies

7. Shell Programming and Scripting

Deleting all the fields(columns) from a .csv file if all rows in that columns are blanks

Hi Friends, I have come across some files where some of the columns don not have data. Key, Data1,Data2,Data3,Data4,Data5 A,5,6,,10,, A,3,4,,3,, B,1,,4,5,, B,2,,3,4,, If we see the above data on Data5 column do not have any row got filled. So remove only that column(Here Data5) and... (4 Replies)
Discussion started by: ks_reddy
4 Replies

8. Shell Programming and Scripting

Compare 2 csv files by columns, then extract certain columns of matcing rows

Hi all, I'm pretty much a newbie to UNIX. I would appreciate any help with UNIX coding on comparing two large csv files (greater than 10 GB in size), and output a file with matching columns. I want to compare file1 and file2 by 'id' and 'chain' columns, then extract exact matching rows'... (5 Replies)
Discussion started by: bkane3
5 Replies

9. Shell Programming and Scripting

Transpose comma delimited data in rows to columns

Hello, I have a bilingual database with the following structure a,b,c=d,e,f The right half is in a Left to right script and the second is in a Right to left script as the examples below show What I need is to separate out the database such that the first word on the left hand matches the first... (4 Replies)
Discussion started by: gimley
4 Replies

10. Shell Programming and Scripting

Extracting data from specific rows and columns from multiple csv files

I have a series of csv files in the following format eg file1 Experiment Name,XYZ_07/28/15, Specimen Name,Specimen_001, Tube Name, Control, Record Date,7/28/2015 14:50, $OP,XYZYZ, GUID,abc, Population,#Events,%Parent All Events,10500, P1,10071,95.9 Early Apoptosis,1113,11.1 Late... (6 Replies)
Discussion started by: pawannoel
6 Replies
PDL(3pm)						User Contributed Perl Documentation						  PDL(3pm)

NAME
PDL - the Perl Data Language DESCRIPTION
(For the exported PDL constructor, pdl(), see PDL::Core) PDL is the Perl Data Language, a perl extension that is designed for scientific and bulk numeric data processing and display. It extends perl's syntax and includes fully vectorized, multidimensional array handling, plus several paths for device-independent graphics output. PDL is fast, comparable and often outperforming IDL and MATLAB in real world applications. PDL allows large N-dimensional data sets such as large images, spectra, etc to be stored efficiently and manipulated quickly. VECTORIZATION
For a description of the vectorization (also called "threading"), see PDL::Core. INTERACTIVE SHELL
The PDL package includes an interactive shell. You can learn about it, run "perldoc perldl", or run the shell "perldl" or "pdl2" and type "help". LOOKING FOR A FUNCTION
? If you want to search for a function name, you should use the PDL shell along with the "help" or "apropos" command (to do a fuzzy search). For example: pdl> apropos xval xlinvals X axis values between endpoints (see xvals). xlogvals X axis values logarithmicly spaced... xvals Fills a piddle with X index values... yvals Fills a piddle with Y index values. See the CAVEAT for xvals. zvals Fills a piddle with Z index values. See the CAVEAT for xvals. To learn more about the PDL shell, see perldl or pdl2. LANGUAGE DOCUMENTATION
Most PDL documentation describes the language features. The number of PDL pages is too great to list here. The following pages offer some guidance to help you find the documentation you need. PDL::FAQ Frequently asked questions about PDL. This page covers a lot of questions that do not fall neatly into any of the documentation categories. PDL::Tutorials A guide to PDL's tutorial-style documentation. With topics from beginner to advanced, these pages teach you various aspects of PDL step by step. PDL::Modules A guide to PDL's module reference. Modules are organized by level (foundation to advanced) and by category (graphics, numerical methods, etc) to help you find the module you need as quickly as possible. PDL::Course This page compiles PDL's tutorial and reference pages into a comprehensive course that takes you from a complete beginner level to expert. PDL::Index List of all available documentation, sorted alphabetically. If you cannot find what you are looking for, try here. MODULES
PDL includes about a dozen perl modules that form the core of the language, plus additional modules that add further functionality. The perl module "PDL" loads all of the core modules automatically, making their functions available in the current perl namespace. Some notes: SYNOPSIS See the SYNOPSIS section at the end of this document for a list of modules loaded by default. PDL::Lite and PDL::LiteF These are lighter-weight alternatives to the standard PDL module. Consider using these modules if startup time becomes an issue. Exports "use PDL;" exports a large number of routines into the calling namespace. If you want to avoid namespace pollution, you must instead "use PDL::Lite", and include any additional modules explicitly. PDL::NiceSlice Note that the PDL::NiceSlice syntax is NOT automatically loaded by "use PDL;". If you want to use the extended slicing syntax in a standalone script, you must also say "use PDL::NiceSlice;". PDL::Math The PDL::Math module has been added to the list of modules for versions later than 2.3.1. Note that PDL::Math is still not included in the PDL::Lite and PDL::LiteF start-up modules. SYNOPSIS
use PDL; # Is equivalent to the following: use PDL::Core; use PDL::Ops; use PDL::Primitive; use PDL::Ufunc; use PDL::Basic; use PDL::Slices; use PDL::Bad; use PDL::MatrixOps; use PDL::Math; use PDL::Version; use PDL::IO::Misc; use PDL::IO::FITS; use PDL::IO::Pic; use PDL::Lvalue; perl v5.14.2 2012-05-19 PDL(3pm)
All times are GMT -4. The time now is 06:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy