Sponsored Content
Top Forums Shell Programming and Scripting Need Help - comma inside double quote in comma separated csv, Post 302695513 by rangarasan on Monday 3rd of September 2012 04:58:18 AM
Old 09-03-2012
use nawk instead of awk if you are in solaris.

Cheers,
Ranga Smilie
This User Gave Thanks to rangarasan For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sed removing comma inside double quotes

I have a csv file with lines like the followings 123456,"ABC CO., LTD","XXX" 789012,"DEF LIMITED", "XXX" before I bcp this file to database, the comma in "CO.," need to be removed first. My script is cat <filename> | sed 's/"CO.,"/"CO."/g' but it doesn't work. Can anyone here able to... (2 Replies)
Discussion started by: joanneho
2 Replies

2. Shell Programming and Scripting

want to remove comma present inside double qoute

Hi friends... I have a dat file like below:- test_file.dat abc,ttt,"""123,89.98",yyu,opp vvv,"23,76.68",w564,"54,98.87",985 i need the remove the comma present inside the double qoute as output:- out_test_file.dat abc,ttt,"""12389.98",yyu,opp vvv,"2376.68",w564,"5498.87",985... (6 Replies)
Discussion started by: gani_85
6 Replies

3. Shell Programming and Scripting

How to redirect in comma separated csv from grep

Hi, I am newbie in unix. Could someone tell me how do I redirect my grep output to a csv/excel ? I have used below command but the outputs are appearing in one column Not in different column. grep -e cmd -e cmd1 test.txt | cut -f 5 | sort | uniq -c> op.csv I do not understand how do I... (14 Replies)
Discussion started by: kmajumder
14 Replies

4. Shell Programming and Scripting

awk print - fields separated with comma's need to ignore inbetween double quotes

I am trying to re-format a .csv file using awk. I have 6 fields in the .csv file. Some of the fields are enclosed in double quotes and contain comma's inside the quotes. awk is breaking this into multiple fields. Sample lines from the .csv file: Device Name,Personnel,Date,Solution... (1 Reply)
Discussion started by: jxrst
1 Replies

5. UNIX for Dummies Questions & Answers

Add a field separator (comma) inside a line of a CSV file

Hi... I can't find my little red AWK book and it's been a long while since I've awk'd. But I need to take a CSV file and convert the first word of the fifth field to its own field by replacing a space with a comma. This is for importing a spreadsheet of issues into JIRA... Example: a line... (9 Replies)
Discussion started by: Tawpie
9 Replies

6. Shell Programming and Scripting

Convert column to quote and comma separated row

Hi, I have a list of tables in a file.txt C_CLAIM C_HLD C_PROVIDER I want the output to be 'C_CLAIM','C_HLD','C_PROVIDER' Currently I'm usin awk and getting output which is almost correct but still has minor defects awk -vORS="','" '{ print $1 }' file.txt The output of... (4 Replies)
Discussion started by: wahi80
4 Replies

7. Shell Programming and Scripting

Insert single quote on every word separated by comma

Hello, I have a text file as:-ABC BCD CDF DEF EFGI need to convert as 'ABC', 'BCD', 'CDF', 'DEF', 'EFG' using a unix command anybody can help me out on this. Regards, Jas Please wrap all code, files, input & output/errors in CODE tags. It makes them easier to read and preserves... (12 Replies)
Discussion started by: jassi10781
12 Replies

8. Shell Programming and Scripting

awk comma seperated value within double quote

Hi, I have a data file separated by comma, data enclosed by "" head file.txt "HD","Sep 13 2016 1:05AM","0001" "DT","273093045","192534" "DT","273097637","192534" .. I want to get the 3rd column value (0001) to be assigned to my variable I tried FILE_VER=`cat file.txt | awk... (2 Replies)
Discussion started by: Prasannag87
2 Replies

9. Shell Programming and Scripting

awk to parse comma separated field and removing comma in between number and double quotes

Hi Experts, Please support I have below data in file in comma seperated, but 4th column is containing comma in between numbers, bcz of which when i tried to parse the file the column 6th value(5049641141) is being removed from the file and value(222.82) in column 5 becoming value of column6. ... (3 Replies)
Discussion started by: as7951
3 Replies

10. UNIX for Beginners Questions & Answers

How to extract fields from a CSV i.e comma separated where some of the fields having comma as value?

can anyone help me!!!! How to I parse the CSV file file name : abc.csv (csv file) The above file containing data like abv,sfs,,hju,',',jkk wff,fst,,rgr,',',rgr ere,edf,erg,',',rgr,rgr I have a requirement like i have to extract different field and assign them into different... (4 Replies)
Discussion started by: J.Jena
4 Replies
msggen(1)							   User Commands							 msggen(1)

NAME
msggen - generate a machine independent formatted message catalog SYNOPSIS
msggen [-fls] catfile [msgfile] DESCRIPTION
msggen merges the message text source file msgfile into a machine independent formatted message catalog catfile. The file catfile is cre- ated if it does not already exist. If catfile does exist, its messages are included in the new catfile. If set and message numbers collide, the new message text defined in msgfile replaces the old message text currently contained in catfile. Non-ASCII characters must be UTF-8 encoded. iconv(1) can be used to convert to/from UTF-8. OPTIONS
The following options are supported: -f List the printf(3C) format signature for each message in catfile. A format signature is one line containing one character for --format each format specification: c char d double D long double f float h short i int j long long l long p void* s string t ptrdiff_t z size_t ? unknown -l List catfile in UTF-8 msgfile form. --list -s Convert the catfile to a message set number and print the number on the standard output. --set OPERANDS
The following operands are supported: catfile Machine independent formatted message catalog file. msgfile Message text source file. USAGE
Message text source files are in gencat(1) format, defined as follows. The fields of a message text source line are separated by a single blank character. Any other blank characters are considered to be part of the subsequent field. The NL_* constants are defined in one or both of <limits.h> and <nl_types.h>. $ comment A line beginning with a $ followed by a blank character is treated as a comment. $delset n comment This line deletes message set n from an existing message catalog. n denotes the set number [1, NL_SETMAX]. Any text following the set number is treated as a comment. $quote c This line specifies an optional quote character c, which can be used to surround message-text so that trailing spaces or empty messages are visible in a message source line. By default, or if an empty $quote directive is supplied, no quoting of message-text is recog- nized. $set n comment This line specifies the set identifier of the following messages until the next $set or end-of-file (EOF) appears. n denotes the set identifier, which is defined as a number in the range [1, NL_SETMAX]. Set numbers need not be contiguous. Any text following the set identifier is treated as a comment. If no $set directive is specified in a message text source file, all messages are located in mes- sage set 1. $translation identification YYYY-MM-DD[,...] Append translation information to the message catalog header. Only the newest date for a given identification is retained in the cata- log. Multiple translation lines are combined into a single, comma-separated list. m message-text m denotes the message identifier, which is defined as a number in the range [1, NL_MSGMAX]. The message-text is stored in the message catalogue with the set identifier specified by the last $set directive, and with message identifier m. If the message-text is empty, and a blank character field separator is present, an empty string is stored in the message catalogue. If a message source line has a message number, but neither a field separator nor message-text, the existing message with that number (if any) is deleted from the cat- alogue. Message identifiers need not be contiguous. There are no message-text length restrictions. EXIT STATUS
0 Successful completion. >0 One or more specified jobs does not exist. EXAMPLES
Example 1 Using msggen The following example generates a message catalog xxx from the message file xxx.msg: example% msggen xxx xxx.msg AUTHORS
Glenn Fowler, gsf@research.att.com ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWastdev | +-----------------------------+-----------------------------+ |Interface Stability |Volatile | +-----------------------------+-----------------------------+ SEE ALSO
gencat(1), iconv(1), msgcc(1), printf(3C), attributes(5) SunOS 5.11 9 Oct 2007 msggen(1)
All times are GMT -4. The time now is 06:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy