Your post #1 didn't say anything about ignoring lines containing the string END as the code above does, said you wanted output files abc.txt and bcd.txt instead of the files produced by the above code (out. table abc.txt and out. table bcd.txt), will convert any sequence of one or more spaces and/or tabs to a single space character (which is not what I expected from the sample you provided), and is processing a file named input_split.txt instead of the file Input.txt that you said you wanted to process.
To get something closer to what you said you wanted, you might try something more like:
You didn't answer my question about what operating system you're using. If you're using a Solaris/SunOS system, change awk to /usr/xpg4/bin/awk or nawk.
Dear All,
I would like to split a file of the following format into multiple files based on the number in the 6th column (numbers 1, 2, 3...):
ATOM 1 N GLY A 1 -3.198 27.537 -5.958 1.00 0.00 N
ATOM 2 CA GLY A 1 -2.199 28.399 -6.617 1.00 0.00 ... (3 Replies)
Hey everyone.
I am trying to figure out a way to create a file that will be renamed based off of one of multiple files. For example, if I have 3 files (cat.ctl, dog.ctl, and bird.ctl) that gets placed on to an ftp site I want to create a single file called new.cat.ctl, new.dog.ctl, etc for each... (3 Replies)
I am a newbie to shell scripting ..
I have a .csv file. It has 1000 some rows and about 7 columns...
but before I insert this data to a table I have to parse it and clean it ..basing on the value of the first column..which a string of phone number type...
example below..
column 1 ... (2 Replies)
Hi,
I'm using AIX(ksh shell).
> cat temp.txt
"a","b",0
"c",bc",0
"a1","b1",0
"cc","cb",1
"cc","b2",1
"bb","bc",2
I want the output as:
"a","b","c","bc","a1","b1"
"cc","cb","cc","b2"
"bb","bc"
I want to combine multiple lines into single line where third column is same.
Is... (1 Reply)
Hi Friends,
I have a single column data like below.
1
2
3
4
5
I need the output like below.
0
1
2
3
4
where each row (including first row) subtracting from first row and the result should print below like the way shown in output file.
Thanks
Sid (11 Replies)
Hi,
i need a single command to create multiple empty files(no trailing lines as well) and empty the files if already existing.
please let me know or if this has been ansered, if some ocan share the link please, thanks
> newfile.txt
or
:> newfile.txt
do not work (4 Replies)
Hi,
I want to convert a single row values to multiple rows, but the no. of rows are not fixed.
For example, I have a row as below
abc-def-lmn-mno-xyz
out put should be
get abc
get def
get lmn
get xyz (4 Replies)
Hello:
I am working parsing a large input file which will be broken down into multiples based on the second field in the file, in this case: STORE.
The idea is to create each file with the corresponding store number, for example: Report_$STORENUM_$DATETIMESTAMP , and obtaining the... (7 Replies)
Hi All,
I have the sales_data.csv file in the directory as below.
SDDCCR; SOM ; MD6546474777 ;05-JAN-16
ABC ; KIRAN ; CB789 ;04-JAN-16
ABC ; RAMANA; KS566767477747 ;06-JAN-16
ABC ; KAMESH; A33535335 ;04-JAN-16
SDDCCR; DINESH; GD6674474747 ;08-JAN-16... (4 Replies)
Hi ALL,
We have requirement in a file, i have multiple rows.
Example below:
Input file rows
01,1,102319,0,0,70,26,U,1,331,000000113200000011920000001212
01,1,102319,0,1,80,20,U,1,241,00000059420000006021
I need my output file should be as mentioned below. Last field should split for... (4 Replies)
Discussion started by: kotra
4 Replies
LEARN ABOUT DEBIAN
text::formattable
Text::FormatTable(3pm) User Contributed Perl Documentation Text::FormatTable(3pm)NAME
Text::FormatTable - Format text tables
SYNOPSIS
my $table = Text::FormatTable->new('r|l');
$table->head('a', 'b');
$table->rule('=');
$table->row('c', 'd');
print $table->render(20);
DESCRIPTION
Text::FormatTable renders simple tables as text. You pass to the constructor (new) a table format specification similar to LaTeX (e.g.
"r|l|5l|R|20L") and you call methods to fill the table data and insert rules. After the data is filled, you call the render method and the
table gets formatted as text.
Methods:
new($format)
Create a Text::FormatTable object, the format of each column is specified as a character of the $format string. The following formats
are defined:
l Left-justified top aligned word-wrapped text.
L Left-justified bottom aligned word-wrapped text.
r Right-justified top aligned word-wrapped text.
R Right-justified bottom aligned word-wrapped text.
10R, 20r, 15L, 12l,
Number is fixed width of the column. Justified and aligned word-wrapped text (see above).
' ' A space.
| Column separator.
head($col1, $col2, ...)
Add a header row using $col1, $col2, etc. as cell contents. Note that, at the moment, header rows are treated like normal rows.
row($col1, $col2, ...)
Add a row with $col1, $col2, etc. as cell contents.
rule([$char])
Add an horizontal rule. If $char is specified it will be used as character to draw the rule, otherwise '-' will be used.
render([$screen_width])
Return the rendered table formatted with $screen_width or 79 if it is not specified.
SEE ALSO
Text::ASCIITable
COPYRIGHT
Copyright (c) 2001-2004 Swiss Federal Institute of Technology, Zurich.
(c) 2009 Trey Harris All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
CODE REPOSITORY
Git - http://github.com/treyharris/Text-FormatTable/tree/master
AUTHOR
David Schweikert <dws@ee.ethz.ch>
Maintained by Trey Harris <treyharris@gmail.com>
Fixed column width and bottom alignment written by Veselin Slavov <vslavov@creditreform.bg>
perl v5.10.0 2009-07-24 Text::FormatTable(3pm)