Having read and appreciating the comments, and being as overwhelmed as the others by the data files, and having removed the <CR> line terminators from the DOS/windows files, I'd like to propose for discussion (hoping to have guessed the requirements correctly)
This is working on a subset of the data; applying it to the entire data set as well as redirecting it to the desired output file is left to the reader.
Some of the space separated key/value pairs of parameters.txt are malformed:
Also, providing five lines of 4068 columns each is not a good example of an input datafile. Can you provide the columns that are pertinent to the problem at hand?
As Don Cragen as requested, please give better description of what you are trying to accomplish, including output? This should include something like:
For example, on line 4 of the input sample data, the value of the 5 column ("a.dent") is used as the lookup key in the parameters table. The returned value ("towel") is used as column 4 of the output file.
The result should look something like:
This User Gave Thanks to derekludwig For This Post:
Also for discussion, here's how CNAI_DUMP_RAW1.txt appears when loaded into Gnumeric. Each line extends to column EZL. I don't suppose it matters how many columns that is?
Can you check the parameters.txt file that your provided? There are differences between your OnGoto's postings. For example, the parameter accmin has a value of '100' as shown by your posting, while the file has 'RANGES', as shown by OnGoto.
Please also remember that standard CSV does not provide a method to highlight values or cells.
- DL
This User Gave Thanks to derekludwig For This Post:
I applaud your efforts to show us reasonable sized sample inputs and corresonding output. But, PLEASE, don't show us pictures of data. (Especially with some data truncated due to field widths in the pictures of tables you show us.) Give us text (in CODE tags) that we can copy and paste into files we can use as test data to try to test code we might write to solve your problem!
I see that the name of one of your input files has changed from paramaters.txt to parameters.txt (and that is good), but why does parameters.txt show four data rows while your expected output has six data columns? Why is the 3rd column in your output (with heading limit1) present when limit1 does not appear in parameters.txt?
You don't show what field separators are to be used in your output. Although most .csv files use comma as the separator, that isn't always the case.
And, flat text .csv files don't contain red coloring. Explain how (or if) this distinctive output is supposed to actually appear in output.csv.
And, please be sure that the sample data you provide is representative of problems your script will have to handle. For example, your original data files contained things like:
which I assume in your latest example should now be:
but your latest sample doesn't show us anything like these cases.
Please explain what the output should look like for a column with the header nccperm? Should it be nccperm(As) or nccperm(As Per BSIC PLAN) or nccperm(as) or nccperm(as per basic plan) or something else?
Which input line is supposed to be used for chap? Or are there supposed to be two copies of that input column in the output.csv file with different values in parentheses on the header line?
i have written my shell script in notepad however i am struggling to pass the data file to be read to the script the data file is of .txt format. My target is to run the shell script from the terminal and pass 3 arguments e.g. polg@DESKTOP-BVPDC5C:~/CS1420/coursework$ bash valsplit.sh input.txt... (11 Replies)
Hello Unix Shell Script Experts,
I have a script that would mask the columns in .csv file or .txt file.
First the script will untar the .zip files from Archive folder and processes into work folder and finally pushes the masked .csv files into Feed folder.
Two parameters are passed
... (5 Replies)
Hi Everyone ,
Below is output from a TL1 , I want just the NE Name: and beside that the Temperature and the voltages in a csv file , Is this possible?
> act-user:AB1S2a:ArshadFO:493::**********;
AB1S2a 2016-02-07 10:13:24
M 493 COMPLD
"ArshadFO:2016-02-07 10-04-55,0"
;... (11 Replies)
Hi Unix Gurus,
I tried to convert the attached xhtml table content into csv file using unix shell script (lynx -dump filename) and got the below results:
Title ID Owner Priority Estimate Project Change Date Changed By
Complexity Create Date Created By Detail Estimate Total De tail... (6 Replies)
Request if some one could provide me shell script that converts the below "input file" to "CSV format file" given
Name Domain Contact Phone Email Location
----------------------- ------------------------------------------------ ------- ----- ---------------------------------... (7 Replies)
thanks for allowing me join your forum
i have an output of linux command "who"
which provides following details.....
CURRENT USER/ACCT INFO
17:31:36 up 4:49, 4 users, load average: 0.03, 0.04, 0.00
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root :0 - 12:59 ?xdm? 4:54 0.02s /bin/sh /usr/bi... (1 Reply)
Hi all,
I have written a shell script to search a specified directory (e.g. /home/user) for a list of specific words (shown as ${TMPDIR}/wordlist below). The script works well enough, but I was wondering if there was a way to display the line number that the word is found on?
Thanks!
cat... (1 Reply)
Hi,
I have gps receiver, by using gpsd data i can read gps log data to my database(my sql).
Steps:
1. telenet localhost 2947 > gps.txt (press enter)
2. r (press enter) //then i will get the data like below in gps.txt file
Trying 127.0.0.1...
Connected to localhost.... (1 Reply)
Hi There
I needed to write a Unix shell script which will pick up the data from a .CSV file and reformat it as per the requirement and write it to another .CSV file.
Currently I am in the proess of Data Import to "Remedy System" (A one kind of incident mangement Application) and this... (8 Replies)