Hi,
So my file looks like this:
title number
JR 2
JR 2
JR 4
JR 5
NM 5
NM 8
NM 2
NM 8
I used this line that I wrote to convert it to rows so it will look like this:
awk -F"\t" '!/^$/{a=a" "$3} END {for ( i in a) {print i,a}}' occ_output.tab > test.txt
JR 2 2 4 5
NM 5 8... (4 Replies)
Hi
I am trying to retrieve values from a tab-delimited file.I am using
while read record
value=`echo $record | cut -f12`
done
Where 12 is the column no i want retieve and record is one line of the file.
But it is returning the full record.
Plz help (4 Replies)
I'm facing a strange problem, please help me out.
Here we go.
I want to count number of fields in particular file.
filename and delimiter character will be passed through parameter.
On command prompt if i type following i get 27 as output (which is correct)
cat customer.dat | head -1 | awk... (12 Replies)
Hi,
I have the following code:
LIST=`ls | grep '.sql$'`
echo $LIST
The above code will give me something like..
file1.sh file2.sh file3.sh file4.sh file5.sh
I want to display the values into rows using echo like...
file1.sh
file2.sh (5 Replies)
I have tried the following to no avail.
xargs -n8 < test.txt
awk '{if(NR%6!=0){p=""}else{p="\n"};printf $0" "p}' Mod_Alm_log.txt > test.txt
I have tried different variations of the above, the problem is mixes lines together.
And it includes the tags "%a and %A" I need them to be all tab... (16 Replies)
Hi,
I need urgent help with a tab delimited file I am working on.
This is the file :
TTTT|YYYYYYY|jargon-journal|MP0000000UID||"j1, j2, j3"
I need th following output:
TTTT|YYYYYYY|jargon-journal|MP0000000UID||ji
TTTT|YYYYYYY|jargon-journal|MP0000000UID||j2... (8 Replies)
Hello!
I have a tab delimited file with values in three columns. Some values occur in all three columns, other values are present in only one or two columns. I would like to sort the file so that rows with no missing values come first, rows with one missing values come next, and rows with two... (9 Replies)
I have a file like this.
It is tab delimited.
Unfortunately, the missing data was filled in with a period "." (see the leading lines 1-5 columns)
I want to substitute the periods for misisng data with an integer "-999".
however, I do not want the global replace to change the other periods seen... (7 Replies)
Hello,
I have 40 data files where the first three columns are the same (in theory) and the 4th column is different. Here is an example of three files,
file 2: A_f0_r179_pred.txt
Id Group Name E0
1 V N(,)'1 0.2904
2 V N(,)'2 0.3180
3 V N(,)'3 0.3277
4 V N(,)'4 0.3675
5 V N(,)'5 0.3456
... (8 Replies)
Discussion started by: LMHmedchem
8 Replies
LEARN ABOUT PLAN9
tbl
TBL(1) General Commands Manual TBL(1)NAME
tbl - format tables for nroff or troff
SYNOPSIS
tbl [ file ... ]
DESCRIPTION
Tbl is a preprocessor for formatting tables for nroff or troff(1). The input files are copied to the standard output, except for segments
of the form
.TS
options ;
format .
data
.T&
format .
data
. . .
.TE
which describe tables and are replaced by troff requests to lay out the tables. If no arguments are given, tbl reads the standard input.
The (optional) options line is terminated by a semicolon and contains one or more of
center center the table; default is left-adjust
expand make table as wide as current line length
box
doublebox
enclose the table in a box or double box
allbox enclose every item in a box
tab(x) use x to separate input items; default is tab
linesize(n)
set rules in n-point type
delim(xy)
recognize x and y as eqn(1) delimiters
Each line, except the last, of the obligatory format describes one row of the table. The last line describes all rows until the next .T&,
where the format changes, or the end of the table at .TE. A format is specified by key letters, one per column, either upper or lower
case:
L
Left justify: the default for columns without format keys.
R
Right justify.
C
Center.
N
Numeric: align at decimal point (inferred for integers) or at
S
Span: extend previous column across this one.
A
Alphabetic: left-aligned within column, widest item centered, indented relative to L rows.
^
Vertical span: continue item from previous row into this row.
-
Draw a horizontal rule in this column.
=
Draw a double horizontal rule in this column.
Key letters may be followed by modifiers, also either case:
| Draw vertical rule between columns.
|| Draw a double vertical rule between columns.
n Gap between column is n ens wide. Default is 3.
Ffont Use specified font. B and I mean FB and FI.
T Begin vertically-spanned item at top row of range; default is vertical centering (with
Pn Use point size n.
Vn Use n-point vertical spacing in text block; signed n means relative change.
W(n) Column width as a troff width specification. Parens are optional if n is a simple integer.
E Equalize the widths of all columns marked E.
Each line of data becomes one row of the table; tabs separate items. Lines beginning with are troff requests. Certain special data items
are recognized:
_
Draw a horizontal rule in this column.
=
Draw a double horizontal rule in this column. A data line consisting of a single or draws the rule across the whole table.
\_
Draw a rule only as wide as the contents of the column.
Rx
Repeat character x across the column.
^
Span the previous item in this column down into this row.
T{
The item is a text block to be separately formatted by troff and placed in the table. The block continues to the next line begin-
ning with T}. The remainder of the data line follows at that point.
When it is used in a pipeline with eqn, the tbl command should be first, to minimize the volume of data passed through pipes.
EXAMPLES
Let <tab> represent a tab (which should be typed as a genuine tab).
.TS
c s s
c c s
c c c
l n n.
Household Population
Town<tab>Households
<tab>Number<tab>Size
Bedminster<tab>789<tab>3.26
Bernards Twp.<tab>3087<tab>3.74
Bernardsville<tab>2018<tab>3.30
.TE
Household Population
Town Households
Number Size
Bedminster 789 3.26
Bernards Twp. 3087 3.74
Bernardsville 2018 3.30
SOURCE
/sys/src/cmd/tbl
SEE ALSO troff(1), eqn(1), doctype(1)
M. E. Lesk and L. L. Cherry, ``TBL--a Program to Format Tables'', Unix Research System Programmer's Manual, Tenth Edition, Volume 2.
TBL(1)