Hi i have a file which has values seperated by "," as shown below and I want to transpose for every doc_id in one row.
Input:
DOC_ID,KEYWORD
105,REGISTROS
105,GEOLOGIA
105,NUCLEOS
105,EXPEDIENTE
105,PROGRAMAS
10025,EXPEDIENTE
10025,LOCALIZACIONES
10025,OFICIOS
10025,PROGRAMAS... (4 Replies)
Hi All,
I have been trying to transpose rows to column in an large file (about 15000 lines) between matching pattern. Searched all posts in this forum, but not able find the solution to my problem. Any help appreciated.!!
Input
/*------XXXXXX-------*/
owner: XXXX
location: XXXX... (3 Replies)
Hi there,
Below is sample three rows which i need transpose into multiple rows.
By keeping first 2 fields static and split them into multiple rows depend following date field. Each into seperate rows.
Sample code:
... (6 Replies)
Hi Folks,
Iam a kinda newbie to unix shell scripting, the scenario is i have a text file containing the following info
Charlie chicago 15
Charlie newyork 26
jonny chicago 14
jonny newyork 15
joe chicago 15
joe newyork 18output should be
Name chicago ... (3 Replies)
Hi there,
I have a small csv file example below:
source,cu_001,cu_001_volume,cu_001_mass,cu_002,cu_002_volume,cu_002_mass,cu_003,cu_003_volume,cu_003_mass
ja116,1.33,3024000,9374400,1.54,3026200,9375123,1.98,3028000,9385512
I want to transpose columns to rows starting at the second... (3 Replies)
Hi All,
In shell, I have below data coming from some some text file as below:
. 351706 5861.8 0.026 0.012 12.584 0.026 0.012 12.582 0.000 0.000 0.000
Now i need the above data to be transposed as below
351706... (16 Replies)
I'm using the testawk.awk from the following thread
https://www.unix.com/shell-programming-and-scripting/18897-row-column-transpose.htmlI'm getting the following output
fieldname1 data1
fieldname2 data2
fieldname3 data3
How can I get like this instead
1 fieldname1 data1
2 fieldname2 data2... (1 Reply)
Gents,
Transpose from row to column, taking in consideration the first column, which contends the date.
Input file
72918,111000009,111000009,111000009,111000009,111000009,111000009,111000009,111000009,111000009
72918,2356,2357,2358,2359,2360,2361,2362,2363,2364
72918,0,0,0,0,0,0,0,0,0... (12 Replies)
Hello guys,
First of all happy holidays and happy new year.
I'm new in bioinformatic and also it is my first time that I write in this forum. Therefore, sorry if I make some mistakes.
I'm writing to ask your help to fix a problem:
I have a file like this:
gene1 GO:0016491|GO:0055114... (8 Replies)
Hi,
I have data in form of
A ram
B shyam
C seeta
D geeta
A bob
B methew
C Richad
D Mike
and i want it in this form.
A B C D
ram shyam seeta geeta
bob methew Richard Mike.
please help by providing the scripting for this. (3 Replies)
Discussion started by: ricbha
3 Replies
LEARN ABOUT CENTOS
erb
ERB(1) Ruby Programmers Reference Guide ERB(1)NAME
erb -- Ruby Templating
SYNOPSIS
erb [--version] [-UPdnvx] [-E ext[:int]] [-S level] [-T mode] [-r library] [--] [file ...]
DESCRIPTION
erb is a command line front-end for ERB library, which is an implementation of eRuby.
ERB provides an easy to use but powerful templating system for Ruby. Using ERB, actual Ruby code can be added to any plain text document for
the purposes of generating document information details and/or flow control.
erb is a part of Ruby.
OPTIONS --version Prints the version of erb.
-E external[:internal]
--encoding external[:internal]
Specifies the default value(s) for external encodings and internal encoding. Values should be separated with colon (:).
You can omit the one for internal encodings, then the value (Encoding.default_internal) will be nil.
-P Evaluates lines starting with % as Ruby code and removes the tailing EOLs.
-S level Specifies the safe level in which eRuby script will run.
-T mode Specifies trim mode (default 0). mode can be one of
0 EOL remains after the embedded ruby script is evaluated.
1 EOL is removed if the line ends with %>.
2 EOL is removed if the line starts with <% and ends with %>.
- EOL is removed if the line ends with -%>. And leading whitespaces are removed if the erb directive starts with
<%-.
-U can be one of Sets the default value for internal encodings (Encoding.default_internal) to UTF-8.
-d
--debug Turns on debug mode. $DEBUG will be set to true.
-h
--help Prints a summary of the options.
-n Used with -x. Prepends the line number to each line in the output.
-v Enables verbose mode. $VERBOSE will be set to true.
-x Converts the eRuby script into Ruby script and prints it without line numbers.
EXAMPLES
Here is an eRuby script
<?xml version="1.0" ?>
<% require 'prime' -%>
<erb-example>
<calc><%= 1+1 %></calc>
<var><%= __FILE__ %></var>
<library><%= Prime.each(10).to_a.join(", ") %></library>
</erb-example>
Command
% erb -T - example.erb
prints
<?xml version="1.0" ?>
<erb-example>
<calc>2</calc>
<var>example.erb</var>
<library>2, 3, 5, 7</library>
</erb-example>
SEE ALSO ruby(1).
And see ri(1) documentation for ERB class.
REPORTING BUGS
Security vulnerabilities should be reported via an email to <security@ruby-lang.org>. Reported problems will be published after being fixed.
And you can report other bugs and feature requests via the Ruby Issue Tracking System (http://bugs.ruby-lang.org). Do not report security
vulnerabilities via the system because it publishes the vulnerabilities immediately.
AUTHORS
Written by Masatoshi SEKI.
UNIX November 7, 2012 UNIX