Questions tagged [table]
The table tag has no usage guidance.
64
questions
0
votes
1answer
44 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
1answer
32 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
0answers
81 views
Setting up VPN On hetzner dedicated issue
Basically I'm trying to route all traffic except for ssh, port 80, port 443 (https) through a vpn (the vpn works however i lose access to the server when running the vpn unless i can get the below to ...
0
votes
1answer
26 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
2answers
157 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
2answers
75 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
2answers
42 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
2answers
394 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
...
0
votes
0answers
27 views
Manually edit a sfdisk table
I have this table
# partition table of /dev/sda
unit: sectors
/dev/sda1 : start= 2048, size= 716800, Id= 7, bootable
/dev/sda2 : start= 718848, size=419430400, Id= 7
/dev/sda3 : start=...
-2
votes
1answer
20 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
1answer
35 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
1answer
215 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
3answers
383 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 ...
1
vote
1answer
1k 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
1answer
352 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
1answer
62 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
0answers
767 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
1answer
965 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
2answers
109 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
4answers
108 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 ...
2
votes
1answer
4k 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
2answers
141 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
1answer
84 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
3answers
13k 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
3answers
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
1answer
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
1answer
296 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
2answers
5k 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
1answer
542 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
1answer
97 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
1answer
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
1answer
402 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
1answer
79 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
3answers
48 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
3answers
2k 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 ...
7
votes
2answers
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
1answer
550 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
1answer
123 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
4answers
128 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
1answer
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
0answers
601 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
3answers
815 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
3answers
144 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
4answers
927 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
1answer
213 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 ...
0
votes
0answers
1k views
Where is the route table file in SUSE?
According to the documentation at
http://www.softpanorama.org/Net/Linux_networking/Suse_networking/suse_etc_sysconfig_network_route.shtml
there should be a table containing the routes at /etc/...
1
vote
2answers
318 views
Alignment when printing a series of records
How can I resolve the problem of the tables going to the right. I just want it to be shown under 1.
Here's my script with START added. The alignment has gone wonky now:
while IFS="," read f1 f2 f3 ...
1
vote
1answer
1k views
Routing table and multiply hops
I have 6 networks, I need to connect network 1 and network 5 via five routers. What’s the command to set multiply hops? ip route add IP_address/mask via IP_adrress dev eth0, but how do I set next hop? ...
1
vote
0answers
1k views
Overlapping Partition table
I'm so done with this, i have this 64GB sd card and i just don't know any more. when i format it the data and partition tables just stay there. :'(
all i want is for a blank drive, i've got a backup ...
23
votes
2answers
29k views
which order is the route table analyzed in?
On my pc I have to following routing table:
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 ...