I have a csv file that i would want to be converted to a table (csv also) filtered, transposed and matched with the header (quite confusing, sorry). So the output can used on a spreadsheet and plot on a grap. I'm using CSH on unix.
To further explain, here is an example input and expected output:
#This input file is a log file which logs every 15 minutes of 3 rows of data, each row for Bin, Total and Percentage, with the date on 1st column. In the example above, there is only 3 log incidents but in actual it can be more than close to 300 lines in 1 day (3rows every 15mins x 4 x 24).
#On the Bin row, some Bin numbers are not present on all log incidents as can be seen on the 1st log - Bin13 is not present but present at 2nd and 3rd incidents, so is Bin16 which not present at 1st but present at 2nd and 3rd incident.
++++++
Output:
++++++
CSV format below. To better visualize, see attached pix in spreadsheet.
# Header is Bin and numbers 1 to 16. (1st columns is a blank " ")
# Values in the Input file in Percentage row of every log incident is transposed if the Bin number of this log incident is matching the Bin header number.
#Some Bin numbers do not appear in all log instances, take note on Bin13 and Bin16 values in the output.
I´m trying to input a plain text table and I want to output a csv file with semicolon field separator.
I have some problems with the \r and the fields with more of one line.. Some gnu util to do this without problems or awk solution?
I´m attaching the original plain table file and the needed... (2 Replies)
Hello,
I have a directory with allot of tab delimited text files that have data that look like,
filePath distance
(1,4-dioxan-2-ylmethyl)methylamine 0.0
4-methylmorpholine 0.0755473632594
1-propyl-4-piperidone 0.157792911954
heptaminol 0.158142893249
N-acetylputrescine 0.158689628956... (3 Replies)
i want to run update query for oracle which is in up.sql taking values from a.csv.
I have implemented shell script to do it.
extn="perl"
ls -1 | while read file
do
echo "$file,$extn" > a.csv
done
up.sql contains
update file_list set filename=$1 where extn=$2;
The code to update is... (2 Replies)
I have a flat file (template) where I want to replace variables based upon a value in another file (csv).
The variables in the template are named %VAR_X_z%
The values are in the csv file and X is field 0 of each line and y field 1 and up.
Example of the csv:
Badidas, 13.00, 12.00, 11.00,... (8 Replies)
Hi there,
i have a file like that in attachment (PLEVA3_280711_SAP.txt), i would extract some basic information from it and report in a new file or table like this:
i try to use bash and i extract the single object in this way (see attach scriptino.sh), but i receive a strange... (5 Replies)
Hi
I need to write a bash script to take the data stored in 3 oracle tables .. and filter them and store the results in a csv file.
It is an Oracle database
Thank you (1 Reply)
I've googled a lot on this, but could not fine a simple one-liner to do this.
I have a .csv file that looks like this:
Header one
Header two
Header three
col1,col2,col3
short data, very long data, dataIf I use sed and change the comma to tab, being the colums of variable length I don't get a... (6 Replies)
Hi !!
I have HTML Tables through which i want to generate graphs, but for creating graphs i need the file in CSV format so can anyone can please help me in how can i convert my HTML table file to CSV format.
Thanks in Advance (2 Replies)