10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi..
I need some help in converting the below horizontal lines to vertical lines format.
can anyone help me on this.
input file
Hour,1,2,3,4,5
90RT,106,111,111,112,111
output file
Hour,90RT
1,106
2,111
3,111
4,112
5,111 (3 Replies)
Discussion started by: Raghuram717
3 Replies
2. UNIX for Beginners Questions & Answers
I have a source csv file consists of first field as variable name, and the rest are site-specific information (converted from excel file, where site -specific values in columns). I am trying to create a file for every site using a template and replace the multiple variables with values from the... (3 Replies)
Discussion started by: apalex
3 Replies
3. Shell Programming and Scripting
I have a text file that looks like this:
FIELD1, FIELD2, THIS IS FIELD3, FIELD4
FIELD1, FIELD2, THIS IS FIELD3, FIELD4
FIELD1, FIELD2, THIS IS FIELD3, FIELD4
I need it to turn it into an XML file to run against a custom application. My ultimate goal is for it to look like... (15 Replies)
Discussion started by: jeffs42885
15 Replies
4. UNIX for Beginners Questions & Answers
I'm trying to use awk to count the occurrences of two matching fields of a CSV file.
For instance, for data that looks like this...
Joe,Blue,Yes,No,High
Mike,Blue,Yes,Yes,Low
Joe,Red,No,No,Low
Joe,Red,Yes,Yes,Low
I've been trying to use code like this...
countvar=`awk ' $2~/$color/... (4 Replies)
Discussion started by: nmoore2843
4 Replies
5. Shell Programming and Scripting
Hi guys,
New to the forum, and been messing around with Linux for about a year now. I'm still very much a rookie, so just assume that I'm a total idiot:
I currently have a shell that spits out a CSV number string of about 8 numbers as follows:
1.00,2.00,3.00 ... ,8.00I need to assign a... (7 Replies)
Discussion started by: hansol
7 Replies
6. Shell Programming and Scripting
I'm new to shell scripting so I'm guessing I'm just not looking at this from the correct angle as this has to be a common task.
What I'm trying to do is take data I've compiled for servers (Name, IPs, HBA WWN's, Storage, etc) and trying to turn that into one row in a CSV file.
So
File1:... (3 Replies)
Discussion started by: The_Grim_Coder
3 Replies
7. Shell Programming and Scripting
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)
Discussion started by: biscayne
8 Replies
8. Shell Programming and Scripting
Hi Fellows,
I have been struggling to fix an issue in csv records to compose sql statements and have been really losing sleep over it. Here is the problem:
I have csv files in the following pipe-delimited format:
Column1|Column2|Column3|Column4|NEWLINE
Address Type|some descriptive... (4 Replies)
Discussion started by: khayal
4 Replies
9. Shell Programming and Scripting
I want to be able to convert the following data from a CSV into individual variables from the columns 2 4 and 8
I can use awk to grab the columns using var1=`cat text.csv | awk "," '{print $2}'` but how do I create separate variables for each line.
595358 ,ECON1010 ,THU ,08:00 - 10:00 ,11 Mar... (6 Replies)
Discussion started by: domsmith
6 Replies
10. Shell Programming and Scripting
Hi I am using KSH and trying to read variables from a csv file. I've set the IFS=, and it workds. Problem is where one of the values is text containing a comma. For example the following lines exist in my file. How can I read everything between the quotes into a single variable?
APW13812,,1... (2 Replies)
Discussion started by: ventris
2 Replies