Hi Experts
I am very new to perl and need to make a script using perl.
I would like to remove blanks in a text tab delimited file in in a specfic column range ( colum 21 to column 43) sample input and output shown below :
Input:
117 102 650 652 654 656
117 93 95... (3 Replies)
I have a large text-file with tab-delimited genetic data that looks like:
KSC112 KSC234 0 0 1 1 A G C T
I simply wan to delete the first column, but since the file has 600 000 columns, it is not possible with awk (seems to be limited at 32k columns).
Does anyone have an idea how to do this? (2 Replies)
Hi All
I wanted to know how to effectively delete some columns in a large tab delimited file.
I have a file that contains 5 columns and almost 100,000 rows
3456 f g t t
3456 g h
456 f h
4567 f g h z
345 f g
567 h j k lThis is a very large data file and tab delimited.
I need... (2 Replies)
I want to add a new column to a tab delimited text file. It will be the first column and it will just be 1's. How do I go about doing that? Thanks! (1 Reply)
I have a text file that made using text editor in Ubuntu. However the text file is not being recognized as space or tab delimited, the formatting seems to be messed up. How can I convert the text file into tab delimited format? (3 Replies)
Hello,
I have some tab delimited files that may contain blank columns. I would like to delete the blank columns if they exist. There is no clear pattern for when a blank occurs.
I was thinking of using sed to replace instances of double tab with blank,
sed 's/\t\t//g'
All of the examples... (2 Replies)
Hi, I have a rquirement in unix as below .
I have a text file with me seperated by | symbol and i need to generate a excel file through unix commands/script so that each value will go to each column.
ex:
Input Text file:
1|A|apple
2|B|bottle
excel file to be generated as output as... (9 Replies)
Hi
i have a problem in my job
i try to convert an excel file (xls extention) to text file (tab delimited), but no result with this comand
cat xxx.xls > xxx.txt
Do you have eny idea?
PS: sorry for my english
Thanks!! (4 Replies)
Discussion started by: frisso
4 Replies
LEARN ABOUT OSX
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