Sponsored Content
Top Forums Shell Programming and Scripting converting .txt to comma delimeted file Post 302236631 by OSD on Tuesday 16th of September 2008 03:20:33 AM
Old 09-16-2008
converting .txt to comma delimeted file

Dear all,

I have a file with 5L records. one of the record in the file is as shown below.
MARIA THOMAS
BASIL
1000 FM 1111 MD





GHANA
YY 77354 4774
99999999 1234567


I need to convert this record in below format

"","","","","MARIA","THOMAS","BASIL","","1000 FM 1111 MD","STE B","","","GHANA","YY","77354","4774",""1234567"99999999"
,"","","","","","","","","","","",""


Please suggest....Thanks in advance.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

converting .txt

Hello, I transferred some .txt files from windows to Unix. When i used the editor in Unix to open up the file, all the <cr> show up. How to I get rid of all of them? (4 Replies)
Discussion started by: laila63
4 Replies

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

3. UNIX for Advanced & Expert Users

converting a .txt file to comma delimeted file

Dear all, I have a file with 5L records. one of the record in the file is as shown below. MARIA THOMAS BASIL 1000 FM 1111 MD ... (1 Reply)
Discussion started by: OSD
1 Replies

4. Shell Programming and Scripting

converting xls file to txt file and xls to csv

I need to convert an excel file into a text file and an excel file into a CSV file.. any code to do that is appreciated thanks (6 Replies)
Discussion started by: bandar007
6 Replies

5. UNIX for Dummies Questions & Answers

Converting txt file to csv file

Hi, Using rsync, I've sent the output to a text file. This is the text file : Pls help me on converting this text file to a csv file. Probably a script or sth to convert the text file to a csv file. (3 Replies)
Discussion started by: anaigini45
3 Replies

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

7. Shell Programming and Scripting

Converting txt file in csv

HI All, I have a text file memory.txt which has following values. Average: 822387 7346605 89.93 288845 4176593 2044589 51883 2.47 7600 i want to convert this file in csv format and i am using following command to do it. sed s/_/\./g <... (3 Replies)
Discussion started by: mkashif
3 Replies

8. Shell Programming and Scripting

Converting txt file to Excel file

Hi All, I have a text file with below content. TradeDate Name SecurityMnc ReasonDesc ======================================= 20120501 Robin ABC FO System Defect 20120502 Robin ABC FO System Defect I would want this in an excel file in 4 columns,... (3 Replies)
Discussion started by: robinbannis
3 Replies

9. Shell Programming and Scripting

Converting txt file into CSV using awk or sed

Hello folks I have a txt file of information about journal articles from different fields. I need to convert this information into a format that is easier for computers to manipulate for some research that I'm doing on how articles are cited. The file has some header information and then details... (8 Replies)
Discussion started by: ksk
8 Replies

10. Shell Programming and Scripting

awk output is space delimeted not tab delimeted

In the below awk the output is space delimited, but it should be tab delimited. Did I not add the correct -F and OFS? Thank you :). The input file are rather large so I did not include them, but they are tab-delimeted files as well. awk awk -F'\t' -v OFS='\t' 'FNR==1 { next } > ... (2 Replies)
Discussion started by: cmccabe
2 Replies
acct(1M)																  acct(1M)

NAME
acct: acctdisk, acctdusg, accton, acctwtmp, closewtmp, utmp2wtmp - overview of accounting and miscellaneous accounting commands SYNOPSIS
file] file] [file] reason DESCRIPTION
Accounting software is structured as a set of tools (consisting of both C programs and shell procedures) that can be used to build account- ing systems. The shell procedures, described in acctsh(1M), are built on top of the C programs. Connect time accounting is handled by various programs that write records into the The programs described in acctcon(1M) convert this file into session and charging records which are then summarized by (see acctmerg(1M)). Process accounting is performed by the HP-UX system kernel. Upon termination of a process, one record per process is written to a file (normally The programs in acctprc(1M) summarize this data for charging purposes; is used to summarize command usage (see acctcms(1M)). Current process data can be examined using (see acctcom(1M)). Process accounting and connect time accounting (or any accounting records in the format described in acct(4)) can be merged and summarized into total accounting records by (see the format in acct(4)). is used to format any or all accounting records (see acctsh(1M)). reads lines that contain user ID, login name, and number of disk blocks, and converts them to total accounting records that can be merged with other accounting records. reads its standard input (usually from and computes disk resource consumption (including indirect blocks) by login. Only files found under login directories (as determined from the password file) are accounted for. All files under a login directory are assumed to belong to that user regardless of actual owner. If is given, records consisting of those file names for which charges no one are placed in file (a potential source for finding users trying to avoid disk charges). If is given, file is the name of the password file. This option is not needed if the password file is (See diskusg(1M) for more details.) turns process accounting off if the optional file argument is omitted. If file is given, it must be the name of an existing file, to which the kernel appends process accounting records (see acct(2) and acct(4)). writes a utmp record to its standard output if the option is not used. If the option is used, writes a record to The record contains the current time and a string of characters that describe the reason for writing the record. A record type of is assigned (see utmp(4) and utmps(4)). The string argument reason must be 11 or fewer characters, numbers, or spaces if option is not used. Otherwise, it must be 63 or fewer characters, numbers, or spaces. For example, the following are suggestions for use in reboot and shutdown procedures, respec- tively: writes a record, for each user currently logged in, to the file This program is invoked by runacct to close the existing file before creat- ing a new one. writes a record, for each user currently logged in, to the file This program is invoked by runacct to initialize the newly created file. FILES
Holds all accounting commands listed in section(1M) of this manual. Current process accounting file. Used for converting login name to user ID Login/logoff history file. New login/logoff history database. SEE ALSO
acctcms(1M), acctcom(1M), acctcon(1M), acctmerg(1M), acctprc(1M), acctsh(1M), diskusg(1M), fwtmp(1M), runacct(1M), acct(2), acct(4), utmp(4). utmps(4), wtmps(4). STANDARDS CONFORMANCE
acct(1M)
All times are GMT -4. The time now is 03:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy