Sponsored Content
Top Forums Shell Programming and Scripting Converting a Delimited File to Fixed width file Post 302120447 by raghavan.aero on Wednesday 6th of June 2007 01:25:58 PM
Old 06-06-2007
Converting a Delimited File to Fixed width file

Hi,
I have a delimited file generated by a database and i need to convert it to fixed width file using the field length of the database. Can any body suggest me how can i proceed with it?
Smilie
Thanks
Raghavan
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Converting Tab delimited file to Comma delimited file in Unix

Hi, Can anyone let me know on how to convert a Tab delimited file to Comma delimited file in Unix Thanks!! (22 Replies)
Discussion started by: charan81
22 Replies

2. UNIX for Advanced & Expert Users

Converting field into fixed width csv

Hi I have a file having record as - 1,aaa,a123,a I need this converted to as 2nd col to 5 chars wide & 3rd col to 6chars wide such as - 1,aaa ,a123 ,a How we could achieve this? Thx in advance. (1 Reply)
Discussion started by: videsh77
1 Replies

3. 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

4. Shell Programming and Scripting

Changing one column of delimited file column to fixed width column

Hi, Iam new to unix. I have one input file . Input file : ID1~Name1~Place1 ID2~Name2~Place2 ID3~Name3~Place3 I need output such that only first column should change to fixed width column of 15 characters of length. Output File: ID1<<12 spaces>>Name1~Place1 ID2<<12... (5 Replies)
Discussion started by: manneni prakash
5 Replies

5. Shell Programming and Scripting

converting fixed length file to delimited file

hi , i need to convert fixed length file to delimited file using unix where length of each column is variable (2 Replies)
Discussion started by: Nishithinfy
2 Replies

6. UNIX for Dummies Questions & Answers

cleaning up spaces from fixed width file while converting to csv file

Open to a sed/awk/or perl alternative so that i can stick command into my bash script. This is a problem I resolve using a combination of cut commands - but that is getting convoluted. So would really appreciate it if someone could provide a better solution which basically replaces all... (3 Replies)
Discussion started by: svn
3 Replies

7. UNIX for Dummies Questions & Answers

Delete header row and reformat from tab delimited to fixed width

Hello gurus, I have a file in a tab delimited format and a header row. I need a code to delete the header in the file, and convert the file to a fixed width format, with all the columns aligned. Below is a sample of the file:... (4 Replies)
Discussion started by: chumsky
4 Replies

8. UNIX for Dummies Questions & Answers

convert # delimited text file to fixed width

Hello gurus, I have a file containing 5 columns delimited by '#' as shown in the example below: HRP1000-PLVAR#HRP1000-OTYPE#HRP1000-OBJID#HRP1000-BEGDA#HRP1000-ENDDA# 99991231#AU7129#000000000#1 PROCTER & GAMBLE# 99991231#TT4283#1000013883#21111 LAUNDRY# 99991231#TT4283#1000013884#21121 DISH... (3 Replies)
Discussion started by: chumsky
3 Replies

9. Red Hat

Converting fixed width file to pipe delimiter in Linux(red-hat)

Hi, I am facing a typical scenario for AWK command . In HP- UNIX is behave as expected but in red hat linux same awk code is not give the same result. The below code is for convert the fixed width file to pipe delimiter file in HP-unix server. awk code: #!/bin/awk -f NR!=1... (11 Replies)
Discussion started by: brij_abhi
11 Replies

10. UNIX for Beginners Questions & Answers

Convert a fixed width file to a delimited file

Hi - this is a generic question .... is there any utility which can convert a fixed width file format to a delimited file (any given character delimited) ? (5 Replies)
Discussion started by: i4ismail
5 Replies
captoinfo(1M)						  System Administration Commands					     captoinfo(1M)

NAME
captoinfo - convert a termcap description into a terminfo description SYNOPSIS
captoinfo [-1] [-v]... [-V] [-w width] filename... DESCRIPTION
captoinfo looks in filename for termcap descriptions. For each one found, an equivalent terminfo description is written to standard out- put, along with any comments found. A description which is expressed as relative to another description (as specified in the termcap tc = field) is reduced to the minimum superset before being displayed. If no filename is given, then the environment variable TERMCAP is used for the filename or entry. If TERMCAP is a full pathname to a file, only the terminal whose name is specified in the environment variable TERM is extracted from that file. If the environment variable TERMCAP is not set, then the file /usr/share/lib/termcap is read. OPTIONS
-1 Display the fields one to a line. Otherwise, the fields are printed several to a line, with a maximum width of 60 characters. -v Display tracing information on the standard error as the program runs. Specifying additional -v options displays more detailed information. -V Display the version of the program in use on the standard error and then exit. -w width Change the output to width characters. FILES
/usr/share/lib/terminfo/?/* compiled terminal description database /usr/share/lib/termcap ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
infocmp(1M), curses(3CURSES), terminfo(4), attributes(5) NOTES
captoinfo should be used to convert termcap entries to terminfo entries because the termcap database may not be supplied in future releases. SunOS 5.11 18 May 1993 captoinfo(1M)
All times are GMT -4. The time now is 06:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy