Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [table]

The tag has no usage guidance.

-2
votes
1answer
47 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
41 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
177 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
99 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
38 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
339 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
369 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
70 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
86 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
1answer
2k 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
91 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
74 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... ...
1
vote
3answers
5k 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
660 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
941 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
209 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
2k 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
409 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
75 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
70 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
286 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
54 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
46 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
874 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
2k 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
413 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. Link to previous question: Previous Question Link G-Man solved that problem with a useful code, but I have a follow-up ...
1
vote
1answer
81 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
119 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
796 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
525 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
665 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
137 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
685 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
121 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
883 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
225 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
761 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
875 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 ...
13
votes
2answers
20k 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 ...
-2
votes
2answers
53 views

extract line from same string

I have a table like this: and a file containing 2 string from the third column as: apple potato i would like to extract the header and all the line that contain the string apple and potato to obtain ...
0
votes
0answers
2k views

Disk /dev/sda doesn't contain partition table

I am unable to booting with my laptop getting this error No operating system after booing with Live cd if i give this command fidsk -l getting below error. mint@mint ~ $ sudo fdisk -l Disk /dev/...
2
votes
2answers
10k views

Sorting a CSV file, but not it's header [duplicate]

I need to sort a CSV file, but the the header row (1st row) keeps getting sorted. This is what I'm using: cat data1.csv | sort -t"|" -k 1 -o data1.csv Here's a sample line: Name|Email|Country|...
0
votes
1answer
78 views

Macbook System Profiler formatted

I want to format the output generated from macbook terminal command system_profiler and transpose the row values to columns under the same Application. Here's a snippet of the file: Firefox: ...
2
votes
0answers
501 views

How to paste an HTML table into Libre Office Calc without losing structure

I want to paste an HTML table into Libre Office Calc. The HTML table rows contain images (in column 1) that should stay with their appropriate row. However, when I paste my HTML into Calc, the images ...
2
votes
1answer
536 views

Sorted HTML table

I need a very quick and easy way to sort HTML tables. The table rows contain images that should stay with their appropriate row. I tried pasting my HTML into Libre Office calc, but the images are not ...
1
vote
1answer
251 views

Move data row(s) to single column while retaining row header(s)

I have reports that are generated in the following tab-delimited format: UNIT TC CC PC TCP FTX FRX HOUSE 55 65 75 85 95 105 CAR 100 200 300 400 500 600 H2 ...
2
votes
4answers
1k views

separate a file into several small files according to columns

I have a data file, which can have N rows, and each row is composed M elements separated by white space. Currently, I want to separate each row into several segments. In other words, assume the ...
4
votes
2answers
4k views

Set alignment of numeric columns when columnating data

I use column -t to format data for easy viewing in the shell, but there seems to be no option to specify column alignment (e.g. align to the right). Any Bash one-liners to do it? I have arbitrary ...
5
votes
0answers
608 views

How can different file descriptors point to the same file in open file table? [duplicate]

Possible Duplicate: How can same fd in different processes point to the same file? I have a hard time grasping the two ideas of File Descriptor Table and Open File Table. Open File Table is a ...
1
vote
3answers
3k views

How can I right-justify variable length output?

So I don't want this: echo "9" 9 Rather I need this, with e.g.: 4 spaces before it: MAGICK "9" 9 So if I try it with 10: MAGICK "10" 10 then it will just have 3 spaces before it. How ...