Sponsored Content
Top Forums Shell Programming and Scripting Converting Tab delimited file to Comma delimited file in Unix Post 96153 by charan81 on Wednesday 18th of January 2006 06:28:08 AM
Old 01-18-2006
Vino..No Luck..

Let me tell u my requirement..

I have a file dmlog.txt with data like this

LOAD_STAGE STAGE_LOAD COMPLETE U0 10-OCT-05
LOAD_STAGE_A D_CA_PRODUCT COMPLETE U0 10-OCT-05
LOAD_STAGE_B D_CB_PRODUCT COMPLETE U0 10-OCT-05

Now i need to convert it to

LOAD_STAGE,STAGE_LOAD,COMPLETE,U0,10-OCT-05
LOAD_STAGE_A,D_CA_PRODUCT,COMPLETE,U0,10-OCT-05
LOAD_STAGE_B,D_CB_PRODUCT,COMPLETE,U0,10-OCT-05

Can u explain me on how to proceed with this Example.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Converting Space delimited file to Tab delimited file

Hi all, I have a file with single white space delimited values, I want to convert them to a tab delimited file. I tried sed, tr ... but nothing is working. Thanks, Rajeevan D (16 Replies)
Discussion started by: jeevs81
16 Replies

2. Shell Programming and Scripting

Retrieving values from tab-delimited file in unix script

Hi I am trying to retrieve values from a tab-delimited file.I am using while read record value=`echo $record | cut -f12` done Where 12 is the column no i want retieve and record is one line of the file. But it is returning the full record. Plz help (4 Replies)
Discussion started by: akashtcs
4 Replies

3. Shell Programming and Scripting

Converting comma separated to pipe delimited file

Hi, I came across a very good script to convert a comma seperated to pipe delimited file in this forum. the script serves most of the requirement but looks like it does not handle embedded double quotes and commas i.e if the input is like 1234, "value","first,second", "LDC5"monitor",... (15 Replies)
Discussion started by: anijan
15 Replies

4. Shell Programming and Scripting

Help with converting Pipe delimited file to Tab Delimited

I have a file which was pipe delimited, I need to make it tab delimited. I tried with sed but no use cat file | sed 's/|//t/g' The above command substituted "/t" not tab in the place of pipe. Sample file: abc|123|2012-01-30|2012-04-28|xyz have to convert to: abc 123... (6 Replies)
Discussion started by: karumudi7
6 Replies

5. Shell Programming and Scripting

how to convert comma delimited file to tab separator

Hi all, How can i convert comma delimited .csv file to tab separate using sed command or script. Thanks, Krupa (4 Replies)
Discussion started by: krupasindhu18
4 Replies

6. Shell Programming and Scripting

How to make tab delimited file to space delimited?

Hi How to make tab delimited file to space delimited? in put file: ABC kgy jkh ghj ash kjl o/p file: ABC kgy jkh ghj ash kjl Use code tags, thanks. (1 Reply)
Discussion started by: jagdishrout
1 Replies

7. UNIX for Dummies Questions & Answers

Need help with tab delimited file in unix

Hi, I need urgent help with a tab delimited file I am working on. This is the file : TTTT|YYYYYYY|jargon-journal|MP0000000UID||"j1, j2, j3" I need th following output: TTTT|YYYYYYY|jargon-journal|MP0000000UID||ji TTTT|YYYYYYY|jargon-journal|MP0000000UID||j2... (8 Replies)
Discussion started by: rayarnab
8 Replies

8. UNIX for Dummies Questions & Answers

Need to convert a pipe delimited text file to tab delimited

Hi, I have a rquirement in unix as below . I have a text file with me seperated by | symbol and i need to generate a excel file through unix commands/script so that each value will go to each column. ex: Input Text file: 1|A|apple 2|B|bottle excel file to be generated as output as... (9 Replies)
Discussion started by: raja kakitapall
9 Replies

9. Shell Programming and Scripting

Help/Advise please for converting space delimited string variable to comma delimited with quote

Hi, I am wanting to create a script that will construct a SQL statement based on a a space delimited string that it read from a config file. Example of the SQL will be For example, it will read a string like "AAA BBB CCC" and assign to a variable named IN_STRING. I then concatenate... (2 Replies)
Discussion started by: newbie_01
2 Replies

10. UNIX for Beginners Questions & Answers

Replace a column in tab delimited file with column in other tab delimited file,based on match

Hello Everyone.. I want to replace the retail col from FileI with cstp1 col from FileP if the strpno matches in both files FileP.txt ... (2 Replies)
Discussion started by: YogeshG
2 Replies
srec_mif(5)							File Formats Manual						       srec_mif(5)

NAME
srec_mif - Memory Initialization File (MIF) format DESCRIPTION
This format was invented by Altera. An ASCII text file (with the extension .mif) that specifies the initial content of a memory block (CAM, RAM, or ROM), that is, the initial values for each address. This file is used during project compilation and/or simulation. You can create a Memory Initialization File in the Memory Editor, the In-System Memory Content Editor, or the Quartus II Text Editor. A Memory Initialization File serves as an input file for memory initialization in the Compiler and Simulator. You can also use a Hexadeci- mal (Intel-Format) File (.hex) to provide memory initialization data. A Memory Initialization File contains the initial values for each address in the memory. A separate file is required for each memory block. In a Memory Initialization File, you must specify the memory depth and width values. In addition, you can specify data radixes as binary (BIN), hexadecimal (HEX), octal (OCT), signed decimal (DEC), or unsigned decimal (UNS) to display and interpret addresses and data values. Data values must match the specified data radix. When creating a Memory Initialization File in the Quartus II Text Editor, you must start with the DEPTH, WIDTH, ADDRESS_RADIX and DATA_RADIX keywords. You can use Tab "" and Space " " characters as separators, and insert multiple lines of comments with the percent "%" character, or a single comment with double dash "--" characters. Address:data pairs represent data contained inside certain memory addresses and you must place them between the CONTENT BEGIN and END keywords, as shown in the following examples. % multiple-line comment multiple-line comment % -- single-line comment DEPTH = 32; -- The size of data in bits WIDTH = 8; -- The size of memory in words ADDRESS_RADIX = HEX; -- The radix for address values DATA_RADIX = BIN; -- The radix for data values CONTENT -- start of (address : data pairs) BEGIN 00 : 00000000; -- memory address : data 01 : 00000001; 02 : 00000010; 03 : 00000011; 04 : 00000100; 05 : 00000101; 06 : 00000110; 07 : 00000111; 08 : 00001000; 09 : 00001001; 0A : 00001010; 0B : 00001011; 0C : 00001100; END; There are several ways to specify the address and data, as seen in the following table: Notation Interpretation Example A : D; Addr[A] = D 2 : 4 Address: 01234567 Data: 00400000 [A0..A1] : D; Addr[A0] to [A1] contain data D [0..7] : 6 (See note below.) Address: 01234567 Data: 66666666 [A0..A1] : D0 D1; Addr[A0] = D0, [0..7] : 5 6 (See note below.) Addr[A0+1] = D1, Address: 01234567 Add [A0+2] = D0, Data: 56565656 Addr[A0+3] = D1, until A0+n = A1 A : D0 D1 D2; Addr[A] = D0, 2 : 4 5 6 Addr[A+1] = D1, Address: 01234567 Addr[A+2] = D2 Data: 00456000 Note: The address range forms are limited in SRecord, the range must be less than 255 bytes. SRecord will never write an address range. Note: When reading MIF file, SRecord will round up the number of bits in the WIDTH to be a multiple of 8. Multi-byte values will be laid down in memory as big-endian. An ASCII text file (with the extension .mif) that specifies the initial content of a memory block (CAM, RAM, or ROM), that is, the initial values for each address. This file is used during project compilation and/or simulation. A MIF contains the initial values for each address in the memory. In a MIF, you are also required to specify the memory depth and width values. In addition, you can specify the radixes used to display and interpret addresses and data values. SIZE MULTIPLIER
In general, binary data will expand in sized by approximately 3.29 times when 8-bit data is represented with this format (16 bit = 2.75, 32 bit = 2.47, 64 bit = 2.34). EXAMPLE
Following is a sample MIF: DEPTH = 32; % Memory depth and width are required % % DEPTH is the number of addresses % WIDTH = 14; % WIDTH is the number of bits of data per word % % DEPTH and WIDTH should be entered as decimal numbers % ADDRESS_RADIX = HEX; % Address and value radixes are required % DATA_RADIX = HEX; % Enter BIN, DEC, HEX, OCT, or UNS; unless % % otherwise specified, radixes = HEX % --Specify values for addresses, which can be single address or range CONTENT BEGIN [0..F]: 3FFF; % Range: Every address from 0 to F = 3FFF % 6 : F; % Single address: Address 6 = F % 8 : F E 5; % Range starting from specific address % -- % Addr[8] = F, Addr[9] = E, Addr[A] = 5 % END; REFERENCE
The above information was gleaned from the following sources: http://www.altera.com/support/software/nativelink/quartus2/- glossary/def_mif.html http://www.mil.ufl.edu/4712/docs/mif_help.pdf COPYRIGHT
srec_mif version 1.58 Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Peter Miller The srec_mif program comes with ABSOLUTELY NO WARRANTY; for details use the 'srec_mif -VERSion License' command. This is free software and you are welcome to redistribute it under certain conditions; for details use the 'srec_mif -VERSion License' command. AUTHOR
Peter Miller E-Mail: pmiller@opensource.org.au //* WWW: http://miller.emu.id.au/pmiller/ Reference Manual SRecord srec_mif(5)
All times are GMT -4. The time now is 02:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy