Sponsored Content
Top Forums UNIX for Dummies Questions & Answers To Add extra commas to a CSV file. Post 302662657 by chillblue on Wednesday 27th of June 2012 01:34:52 AM
Old 06-27-2012
Hi All,

I want the extra commas to be placed in a file and save it with the commas. The above help helped me to display the content with commas.

Please help me in adding the commas and saving the file. The number of commas is also not fixed ... the length of the max column has to be taken.

Thanks in advance.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

replacing commas with tilde in csv file.

hello all, i have a comma delimited file. i want to replace the commas in the file with the tilde symbol using sed. how can i do this? thanks. (4 Replies)
Discussion started by: femig
4 Replies

2. Shell Programming and Scripting

manipulating csv to add extra row

hi how do i manipulate .csv file to add an extra row after each row using shell script? I need a blank line added for each 1000 records in my file? I will then need to copy and paste some data in the blank row created. thanks 4 ur support neil (3 Replies)
Discussion started by: neil546
3 Replies

3. Shell Programming and Scripting

Remove duplicate commas after exporting excel file to csv

Hello everyone I'm new here and this is my first post so first of all I want to say that this is a great forum and I have managed to found most of my answers in these forums : ) So with that I ask you my first question: I have an excel file which I saved as a csv. However the excel file... (3 Replies)
Discussion started by: Spunkerspawn
3 Replies

4. Shell Programming and Scripting

shell script to remove extra commas from CSV outp file

Name,,,,,,,,,,,,,,,,,,,,Domain,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,Contact,Phone,Email,,,,,,,,,,,,,,,,,,,,,,,,,,,,,Location -----------------------,------------------------------------------------,-------,-----,---------------------------------,------------------------------------ ----... (1 Reply)
Discussion started by: sreenath1037
1 Replies

5. Shell Programming and Scripting

Adding Extra Commas to a CSV file

Trying in this forum. Not sure if it is permitted.... but in need of help. Please find the requirements in the below link. https://www.unix.com/unix-dummies-questions-answers/191503-add-extra-commas-csv-file-2.html#post302665179 Thanks in Advance. (1 Reply)
Discussion started by: chillblue
1 Replies

6. UNIX for Dummies Questions & Answers

To Add extra commas to a CSV file using 2 files...

Hi , Based on my previous requirement the code works fine for comma as delimiter. Now my Req is widened up a bit .. There will be two set of files .. one with comma as delimiter and other with semi-colon ; as delimiter. Second Sample file. With Double Quotes (Semi-Colon... (1 Reply)
Discussion started by: chillblue
1 Replies

7. Shell Programming and Scripting

HELP with AWK or SED. Need to replace the commas between double quotes in CSV file

Hello experts, I need to validate a csv file which contains data like this: Sample.csv "ABCD","I",23,0,9,,"23/12/2012","OK","Street,State, 91135",0 "ABCD","I",23,0,9,,"23/12/2012","OK","Street,State, 91135",0 I just need to check if all the records contain exactly the number of... (5 Replies)
Discussion started by: shell_boy23
5 Replies

8. Shell Programming and Scripting

How to delete the commas in a .CSV file that are enclosed in a string with double quotes?

Okay, I would like to delete all the commas in a .CSV file (TEST.CSV) or at least substitute them with empty space, that are enclosed in double quote. Please see the sample file as below: column 1,column 2,column 3,column 4,column 5,column 6,column 7,column 8,column 9,column 10... (8 Replies)
Discussion started by: dhruuv369
8 Replies

9. UNIX for Beginners Questions & Answers

Removing commas from CSV file

Hi I'm creating a sh script to generate a csv file. The CSV contains the values from a sql table. The content looks this: a,b,c,c2,c3,,,,,,,,,,,d,e I have some code that can separate the fields using the comma as delimiter, but some values actually contain commas, such as... (2 Replies)
Discussion started by: preema
2 Replies

10. Shell Programming and Scripting

How to remove unwanted commas from a .csv file?

how to remove unwanted commas from a .csv file Input file format "Server1","server-PRI-Windows","PRI-VC01","Microsoft Windows Server 2012, (64-bit)","Powered On","1,696.12","server-GEN-SFCHT2-VMS-R013,server-GEN-SFCHT2-VMS-R031,server-GEN-SFCHT2-VMS-R023"... (5 Replies)
Discussion started by: ranjancom2000
5 Replies
ctstat(1)                                                          User Commands                                                         ctstat(1)

NAME
ctstat - display active system contracts SYNOPSIS
/usr/bin/ctstat [-a] [-i contractid...] [-t type...] [-v] [interval [count]] DESCRIPTION
The ctstat utility allows a user to observe the contracts active on a system. Unless you specify the -i or -t option, ctstat displays statistics on all contracts in the system. OPTIONS
The following options are supported: -a Display all contracts regardless of state. By default, this option only displays those contracts which are in the owned, inherited, or orphan states. -i contractid... Request status on the specified contracts, identified by their numeric contract identifier (contract_id). This option accepts lists as arguments . Items in the list can be separated by commas, or enclosed in quotes and separated by commas or spaces. -t type... Request status on contracts of the specified type (type). This option accepts lists as arguments. Items in the list can be separated by commas, or enclosed in quotes and separated by commas or spaces. The following types are supported: process Process contracts -v Verbose output. OPERANDS
The following operands are supported: interval Report once each interval seconds. count Print only count reports. OUTPUT
The following list defines the column headings and the meanings of a ctstat report: CTID The contract ID of the contract. ZONEID The zone ID of the contract's creator. TYPE The contract type. STATE The state of the contract: owned Contract is owned by a process. inherited The contract owner has exited abnormally and the contract has been inherited by the owner's process contract. orphan The contract owner has abandoned the contract, the contract owner exited abnormally and the contract was not inherited by the owner's process contract, or the process contract which had inherited the con- tract was abandoned by its owner. dead The contract is no longer active. It is removed from the system automatically when all references to it (open file descriptors, contract templates, and events) have been released. HOLDER If the contract is in the owned state, the pid of the process that owns the contract. If the contract is in the inherited state, the id of the regent process contract. EVENTS The number of unacknowledged critical events pending. QTIME The time until quantum ends, or - if no negotiation is in progress. NTIME The time until negotiation ends, or - if no negotiation is in progress. EXAMPLES
Example 1: Reporting on all Contracts in the System The following example reports on all contracts in the system: example% ctstat -a CTID TYPE STATE HOLDER EVENTS QTIME NTIME 1 process owned 100579 0 - - 2 process dead - 1 - - 3 process inherit 1 3 - - 4 process orphan - 0 - - Example 2: Obtaining a Verbose Report of All Contracts in the System The following example obtains a verbose report of all contracts in the system: example% ctstat -av CTID TYPE STATE HOLDER EVENTS QTIME NTIME 1 process owned 100579 0 - - informative event set: none critical event set: hwerr core fatal event set: hwerr parameter set: none member processes: 100600 100601 inherited ctids: none 2 process dead - 1 - - informative event set: none critical event set: none fatal event set: hwerr core parameter set: pgrponly member processes: none inherited ctids: none EXIT STATUS
The following exit values are returned: 0 Successful completion. 1 An error occurred. 2 Invalid arguments. FILES
/system/contract/* ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ |Interface Stability |See below. | +-----------------------------+-----------------------------+ Human Readable Output is Unstable. Invocation is Evolving. SEE ALSO
ctrun(1), ctwatch(1), contract(4), process(4), attributes(5) SunOS 5.10 15 Jul 2004 ctstat(1)
All times are GMT -4. The time now is 08:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy