Questions tagged [table]
The table tag has no usage guidance.
69
questions
0
votes
0
answers
18
views
Cant format html table correctly [migrated]
I want to achive this table format
+--------------------+
| 1 |
|--------------------|
| 2 |3 |
|-------------| |
| 4 | 5 | |
| |------| |
| ...
0
votes
1
answer
33
views
How to use one table (ods) file as a base for another table file?
I have an accounting ledger table (.ods) file which should be the base for other table files.
This table file should be the base for other table files such as:
2023.ods
2024.ods
2025.ods
These are ...
0
votes
0
answers
26
views
Receiving an error..... Check 1 failed Output file not found rm: cannot remove 'average.dat': No such file or directory {"code":1,"response":null}
THE QUESTION STATES:
The file ALE.csv contains the information shown in Table 1. Write a program to use the file to produce a text file containing the information in the file along with the winning ...
0
votes
0
answers
8
views
How to choose numeric precision when creating a file with STILTS?
I am using the STILTS command-line tools, popular in astronomical data processing, to merge many (~330k) .fits tables into 1 large table. I am doing this with the STILTS command in the terminal
stilts ...
-5
votes
3
answers
146
views
How to transform bash output to bash table [closed]
My output after running a program in bash looks like this (two rows, : limiter, four columns of data)
#003:BMW:11:36
#004:Audi:2:35
I would like to convert that to a bash table like this
Number
Car
...
0
votes
1
answer
65
views
Sorting a table with a non-newline record separator in bash
I have a table that looks like
'a;b;f|d;e;c|g;h'
which I wish to sort by the third column. The output should be
'g;h|d;e;c|a;b;f'
If I were to use the standard delimiters whitespace and newline then ...
0
votes
1
answer
33
views
Pasting files and concatating files together
I have various years and months of data for numerous site locations. I have computed the average for all months for each needed year. Each Month/Year has its own its own file. Not all sites have data ...
0
votes
1
answer
50
views
Transpose large table
guys
I am sorry if this has been asked before, but I will give it a try.
I have a table (tab delimited text file) that is formatted like this
Species1 Species2 Species3
Gene 1 Value ...
0
votes
1
answer
36
views
shell: combining several tables [duplicate]
Within same workdir I have several 2 column tables (with | separators between the columns) containing the same number of lines and share the order within the first column . Here is an example for two ...
0
votes
1
answer
357
views
Filter rows of a file by list of a second file
file1.tabular contains information of 'elements' over 3 columns.
element1 235 oval red \
element2 334 oval red \
element3 356 rectangular blue
file2.txt contains a single column
element1\
element3
I ...
-1
votes
2
answers
426
views
Awk to convert TSV table into grid table [closed]
I want to convert a text table with tab as delimiter
(i.e., basically a TSV file)
to a grid table with lines on all borders (inside and outside)
and text wrapping.
The below is the input
TrackId ...
1
vote
2
answers
92
views
Merge rows using common values in any column
I have a tab-delimited file like shown below, and would like to merge the rows based on matches in any of the columns. The number of columns are usually 2, but could vary in some cases and be 3.
...
-2
votes
2
answers
45
views
Text to table with v lookup [closed]
I have file as below
FileName:File1.txt
Can we get the format as below table
1
vote
2
answers
966
views
BASH: AWK pivot CSV into desired table
I have been struggling with pivoting .csv file into desired table format using bash.
My file o/p:
$ cat finalcount.csv
state,status,count
NW,CONGESTED,11
NW,CLEARED,9
ACT,CLEARED,7
ACT,CONGESTED,7
...
-2
votes
1
answer
30
views
Is it possible to sort out similar rows in a table and put the number in a column? [duplicate]
I have this table
gene 5 5 5
gene 4 4 3
gene 5 5 5
gene 1 4 5
and I would like to have the following,
gene 5 5 5 2
gene 4 4 3 1
gene 1 4 5 1
so in the last column ...
0
votes
1
answer
45
views
Merging two .csv tables one with header other - not
I need to merge two .csv tables,
one that contains the following info with NO HEADER:
gene0 ABCD
gene1 xyz
gene2 1234
..etc
Another table has a header and information like that:
gene_id ...
-2
votes
1
answer
411
views
How can I scramble a text file table, with a table
I have a table. The column order must not be changed. And the values should be kept.
Name Age size Code
Abel 10 S A
Bjorn 20 M B
Casimir 30 L C
Dennis 40 XL D
I don't just ...
0
votes
3
answers
625
views
How to calculate the sum of bytes in a column?
I have this table below, how can I calculate the sum of bytes for records in Nov only? for example below I want to find rows in Nov then sum the numbers in column4 relevant to Nov only? how I can do ...
2
votes
1
answer
2k
views
Awk for merging multiple files with common column
I have a question concerning awk command in unix to merge multiple tables with a common value
Tab1
Geneid Chr Start End Strand Length Sample_1
ENSG00000278267 1 17369 17436 - 68 0
...
2
votes
1
answer
480
views
Manually set NX bit of specific PTE
On Ubuntu with kernel 4.16.7 I am writing a custom system call and, I want to set the NX bit of a specific Page Table Entry. So far I have this piece of code, where I am doing a page table walk to get ...
0
votes
1
answer
107
views
How to add a text file content to the next column of an existing table
How do a add a new line to an existing .txt file, that consists of a text string, a tab, and a value of another text file?
Precisely, I have a text file test1.txt that looks like this:
A B
and a ...
1
vote
0
answers
935
views
Referencing dynamically created table names in Create statement written in shell script
I need to write a script to automatically generate a month end report.
The generation process involved creating tables in database and then accessing them later in the same script to create another ...
1
vote
1
answer
1k
views
Why some tables contains only part of chains in iptables?
I am reading some tutorial on the webpage iptables tutorial.
There are five chains in iptables.
PREROUTING chain
OUTPUT chain
FORWARD chain
INPUT chain
POSTROUTING chain
And there are four tables in ...
0
votes
2
answers
157
views
Changing from row to column with Shell script command
I'm using UNIX language to extract my files. I used this command to extract it:
value_1=$(cat tmp.csv | head -1001 | cut -f 3-6 -d','> tmp1.csv)
value_2=$(cat tmp.csv | head -2002 | tail -1001 | ...
2
votes
4
answers
120
views
Extracting lines appeared consecutively for 3 times or more in Linux
I have a table in Linux :
A 0
A 0
A 0
B 0
B 1
B 0
B 1
B 0
I want to extract lines appeared consecutively for 3 times or more.
My expected output is :
A 0
Actually, 3 times or more is just a ...
1
vote
1
answer
5k
views
printing row-based data in a table format on Linux
I have the below data in a file:
col1 col2 col3 subcol1 subcol2 subcol3
subcol4 subcol5 subcol6
col4 subcol7 subcol8 subcol9
subcol10 subcol11 subcol2
The ...
1
vote
2
answers
175
views
Extracting quoted and labelled data from a given column
I have a large GTF file, like below:
# ./stringtie -p 4 -G /home/humangenome_hg19/homo_gtf_file.gtf -o strAD1_as/transcripts.gtf -l strAD1 /home/software/star-2.5.2b/bin/Linux_x86_64/mapA1Aligned....
0
votes
1
answer
86
views
Edit value in table
Need to set a function which receives a username, location in the table and the new value to set.
the table set is
user:value1:value2:value3
I realize how I can do the replace using awk '{gsub... ...
4
votes
3
answers
18k
views
Bash output array in table
I'm quite new at bash and I am trying to learn it by creating some small scripts.
I created a small script to look up the DNS entry for multiple domains at the same time. The domains are given as ...
3
votes
3
answers
1k
views
Delete columns that sum to zero
I have a numeric table, that is all cells have numbers. It is a tab-delimited file, with non-numeric headers and row names. I need to delete all columns that add up zero. I would like to keep the ...
1
vote
1
answer
2k
views
Adding column to a table by concatenating values from other columns
I have several csv table as follow:
YEAR;MONTH;DAY;RES1;RES2
1971;1;1;1206.1;627
1971;1;2;1303.4;654.3
1971;1;3;1248.9;662
1971;1;4;1188.8;666.8
From this I would like to create a new column that ...
0
votes
1
answer
353
views
Calculate average values for each day over multiple years
I have some "CSV" data (actually using ; as a delimiter)
having a row for every day from 1971-01-01 through 2099-12-31
(a span of 2099−1971=128 years). The data are organized as follows:
YEAR;MONTH;...
1
vote
2
answers
6k
views
Change header using sed or awk
I have different file for which I would like to change the header.
Currently the tables are as follow:
MONTH GFDL.ESM2M_ECOMAG GFDL.ESM2M_HYPE
1 3546.21855483871 2345.11127781945
I would like to ...
1
vote
1
answer
724
views
Paste different csv files
I have a bunch of input csv files (delimited with semi-colon ";" having the following format
YEAR;MONTH;DAY;RES1FILE1;RES2FILE1;RES3FILE1
1901;01;01;101;154;169
1901;01;02;146;174;136
The number of ...
1
vote
1
answer
122
views
space in time column causing problem in formatting html file in script
I am in the process of creating an automated mail where in the body of the mail data should be displayed in a table format. I did some extent generate a table format in the body of mail, but I am ...
0
votes
1
answer
74
views
reformat values in a table
I have some tables, in which I need to replace several values. I have different commands sed and tr that work just fine when I apply them to a single file.
But somehow, when I want to build a loop ...
0
votes
1
answer
467
views
Replace value in a table
I have some tables for which I need to replace a field that has a random position in each table.
For information, the table are semicolon separated fields and I would like to replace the field "datum"...
0
votes
1
answer
87
views
Table - Replace values of a column
I have several tables (tab separated) in which the first column is as follow:
MONTH
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
I would like to replace those values by the actual ...
0
votes
3
answers
49
views
Reformat table - Number of digits
I have some tables were the numbers have too much digits; as follow:
MONTH A1 A2 A3 ......
1 1.54564468 2.48949 6.4984984 .....
Is there a way, using unix, to reformat the table in the following ...
0
votes
3
answers
3k
views
How can I use a triple slash as a delimiter with cut?
I have a table in which each entry looks something like,
coagulation factor VIII-associated 1 /// coagulation factor VIII-associated 2 /// coagulation factor VIII-associated 3
I would like to use ...
8
votes
2
answers
3k
views
Issue with column command and color escape codes
I'm colorizing the header of a table formatted with column -ts $'\t'
Works well without color codes, but when I add color codes to the first line column doesn't properly align the output.
Without ...
1
vote
1
answer
600
views
Matching 2 main columns between files; and paste other columns into the output file when those main columns match. Keep row size of 1st file intact
This is a follow-up question to my previous question asked about 24 hours ago: Matching two main columns at the same time between files, and paste supplementary columns into the output file when those ...
1
vote
1
answer
167
views
Replace values in a table
I have a table (ascii format with space delimiter), as follow:
1 1 1900 111
1 2 1900 121
1 3 1900 145
1 4 1900 1.45e 07
1 5 1900 5.21e 25
1 6 1900 152
I would like, that if there is a fifth column (...
2
votes
4
answers
134
views
Move files/table following selection criteria
Considering a variable a describing temperature series for the city a. I have 9 directories (a1, a2, a3, a4, a5, a6, a7, a8, a9) each of them containing a table (respectively a1.txt, a2.txt, a3.txt, ...
1
vote
1
answer
1k
views
Text extraction from HTML page
I am using xidel command to extract text from HTML page.
Here is my code
xidel http://www.ip-adress.com/ip_tracer/8.8.8.8 --extract "<table>
<tbody>
<tr>
<td>
<...
1
vote
0
answers
620
views
extracting text from HTML
I have this page. I want to extract text from html page, particularly table heading (th) and table data (td). For example:
Country: United States (US),State: California where th = Country and td = ...
4
votes
3
answers
883
views
Leap year - extrapolating value
I have some tables (table.txt) as follow:
YEAR MONTH DAY RES
1971 1 1 1345
1971 1 2 1265
1971 1 3 1167
The length of each time series goes from 1.1.1971 until 31.12.2099. ...
3
votes
3
answers
153
views
Reformat tables
I have some tables (table.txt) that have been wrongly built and present redundancey in the results, as follow:
YEAR MONTH DAY RES
1971 1 1 245
1971 1 2 587
...
1971 12 31 685
1971 1 ...
3
votes
4
answers
1k
views
Convert floating point numbers to decimal numbers
I have several 'ascii' tables in a directory, some of them have numbers expressed in decimal and some others ones in floating point, as follow:
1 1 1423
1 2 1589
1 3 0.85e 5
1 4 0.89e 4
1 5 8796
...
...
0
votes
1
answer
337
views
Merging and appending tables to create a master table of multiple tables
How to we can merge and append the multiple tables in the same format having same as well as different data point and merge all of the together by inputting zero to the null data points. Desired input ...