Sponsored Content
Top Forums Shell Programming and Scripting Converting csv file to flat file Post 303023612 by rohit_shinez on Thursday 20th of September 2018 02:57:36 AM
Old 09-20-2018
Basically the text file have fixed length like country - 1-20,id 21-25,role - 26-30.
Country - will accept only 20 characters
id - 5 characters
role - 5 characters
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Converting Pivot file to flat file

I have a file in this format. P1 P2 P3......................... A001 v11 v21 v31...................... A002 v12 v22 v32............................ A003 v13 v23 v33.......................... A004 v14 v24 v34.............................. . . . A00n... (2 Replies)
Discussion started by: vskr72
2 Replies

2. Shell Programming and Scripting

Awk to convert a flat file to CSV file

Hi , I have a file with contents as below: Contract Cancellation Report UARCNCL LOS CODE DATE REAS TYPE AMOUNT AMOUNT LETTER BY ========= ======= ==== ==== ==== ========= ==== ==== 8174739 7641509 1S NONE CRCD 30-JUN-2008 NPAR N .00 .00 CCAN 8678696 8091709 1S NONE DDEB 30-JUN-2008... (14 Replies)
Discussion started by: rkumudha
14 Replies

3. Shell Programming and Scripting

Converting Column to Rows in a Flat file

Hi, Request To guide me in writing a shell program for the following requirement: Example:if the Input File contains the follwing data Input File Data: 80723240029,12,323,443,88,98,7,98,67,87 80723240030,12,56,6,,,3,12,56,6,7,2,3,12,56,6,7,2,3,88,98,7,98,67,87... (5 Replies)
Discussion started by: srinikal
5 Replies

4. UNIX for Advanced & Expert Users

Problem in converting password protected excel file to csv file in unix

I need to convert a password protected excel file which will be in UNIX server to a comma separated file. For this I need to open the excel file in UNIX box but the UNIX box doesn't prompt for password instead it is opened in an encrypted manner. I could manually ftp the excel file to local... (2 Replies)
Discussion started by: Devivish
2 Replies

5. UNIX for Advanced & Expert Users

Converting .csv file into .xls file and send it to inbox

Hi All, I wrote a script to extract data from Oracle DB and place it in a text file , and I have coverted .txt file into comma seperated .csv file and I sent it to my mail box . I can get .xls file in my inbox.I am getting all data in same column and in different rows , without column... (1 Reply)
Discussion started by: krthkmuthu
1 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. Shell Programming and Scripting

Converting a flat file in XML

Hello Friends, I am new to UNIX shell scripting. Using bash....Could you please help me in converting a flat file into an XML style output file. Flat file: (Input File entries looks like this) John Miller: 617-569-7996:15 Bunting lane, staten Island, NY: 10/21/79: 60600 The... (4 Replies)
Discussion started by: humkhn
4 Replies

8. UNIX for Advanced & Expert Users

Converting the date format in a flat file

Hi All, I am new to this forum, could any one help me out in resolving the below issue. Input of the flat file contains several lines of text for example find below: 5022090,2,4,7154,88,,,,,4/1/2011 0:00,Z,L,2 5022090,3,1,6648,88,,,,,4/1/2011 0:00,Z,,1... (0 Replies)
Discussion started by: av_sagar
0 Replies

9. Shell Programming and Scripting

Help with converting XML to Flat file

Hi Friends, I want to convert a XML file to flat file. Sample I/p: <?xml version='1.0' encoding='UTF-8' ?> <DataFile xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' contactCount='4999' date='2012-04-14' time='22:00:14' xsi:noNamespaceSchemaLocation='gen .xsd'> <Contact... (3 Replies)
Discussion started by: karumudi7
3 Replies

10. Shell Programming and Scripting

reading a csv file and creating a flat file

hi i have written a script for reading a csv file and creating a flat file, suggest if this script can be optimized #---------------- FILENAME="$1" SCRIPT=$(basename $0) #-----------------------------------------// function usage { echo "\nUSAGE: $THIS_SCRIPT file_to_process\n"... (3 Replies)
Discussion started by: mprakasheee
3 Replies
IP::Country::MaxMind(3) 				User Contributed Perl Documentation				   IP::Country::MaxMind(3)

NAME
IP::Country::MaxMind - Look up country by IP Address SYNOPSIS
use IP::Country::MaxMind; my $gi = IP::Country::MaxMind->new(GEOIP_STANDARD); # look up IP address '65.15.30.247' # returns undef if country is unallocated, or not defined in our database my $cc1 = $gi->inet_atocc('65.15.30.247'); my $cc2 = $gi->inet_atocc('yahoo.com'); DESCRIPTION
This module adapts the Geo::IP module to use the same interface as the IP::Country modules; thus allowing users to easily switch between using the two underlying databases. DATABASE UPDATES
Free monthly updates to the database are available from http://www.maxmind.com/download/geoip/database/ If you require greater accuracy, MaxMind offers a Premium database on a paid subscription basis. The author of this module is in no way associated with MaxMind. CLASS METHODS
$gi = IP::Country::MaxMind->new( $flags ); Constructs a new IP::Country::MaxMind object with the default database located inside your system's datadir, typically /usr/local/share/GeoIP/GeoIP.dat. Flags can be set to either GEOIP_STANDARD, or for faster performance (at a cost of using more memory), GEOIP_MEMORY_CACHE. When using memory cache you can force a reload if the file is updated by setting GEOIP_CHECK_CACHE. $gi = IP::Country::MaxMind->open( $database_filename, $flags ); Constructs a new Geo::IP object with the database located at $database_filename. OBJECT METHODS
All object methods are designed to be used in an object-oriented fashion. $result = $object->foo_method($bar,$baz); Using the module in a procedural fashion (without the arrow syntax) won't work. $cc = $gi->inet_atocc(HOSTNAME) Takes a string giving the name of a host, and translates that to an two-letter country code. Takes arguments of both the 'rtfm.mit.edu' type and '18.181.0.24'. If the host name cannot be resolved, returns undef. If the resolved IP address is not contained within the database, returns undef. $cc = $gi->inet_ntocc(IP_ADDRESS) Takes a string (an opaque string as returned by Socket::inet_aton()) and translates it into a two-letter country code. If the IP address is not contained within the database, returns undef. $cc = $gi->db_time() Returns zero. For compatibility only. COPYRIGHT
Copyright (C) 2002,2003 Nigel Wetters Gourlay. All Rights Reserved. NO WARRANTY. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.12.1 2006-04-06 IP::Country::MaxMind(3)
All times are GMT -4. The time now is 10:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy