Sponsored Content
Top Forums Shell Programming and Scripting Parse comma delimited and optionally quotes dimilited file Post 302239526 by vramana2003 on Wednesday 24th of September 2008 12:21:25 AM
Old 09-24-2008
Hi,
Thank you for the solution.

But, I would like to know how to do it in a shell script.

Regards,
Ram
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Comma Delimited file

I have a comma delimited file that sometimes has addresses details in. The problem is that the address detail can be seen as: "Sample House, Sample Road". When I run a script specifying the file is comma delimited I would like it to ignore comma's that are in between speech marks. Is this... (2 Replies)
Discussion started by: dbrundrett
2 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. Shell Programming and Scripting

Parsing comma delimited text file

I need to delete a set of files in certain directories if there're older than a certain number of days. So I have a text file, with each line containing the directory & number of days. The format is like this: dirA,5 dirB,7 How do I write script to iteratively parse this text file & delete... (5 Replies)
Discussion started by: chengwei
5 Replies

4. UNIX for Dummies Questions & Answers

Comma delimited file

Hi All, I have output of sql saved in comma separated file. Now i need to read line by line this file and assign word to a unix variable for further processing Eg: Test file world, 1, 3, 4 earth,2,3,4,5 moon,1,2,3,4 Output should be word1= world word2=1 echo " first word... (7 Replies)
Discussion started by: gwrm
7 Replies

5. Shell Programming and Scripting

Replacing comma with in double quotes in a csv file

Hello, I need to read a csv file and I am trying to replace a comma with a text DSEE?DSEE. Example Input "Chapter","NewTrains, "oldTrains","Delayed",10,"London" "Chapter","Newbuses,oldbuses","On Time",20,"London" Output "Chapter","NewTrainsDSEE?DSEE... (5 Replies)
Discussion started by: venkatvani
5 Replies

6. UNIX for Dummies Questions & Answers

Flat File - Comma Delimited

I have a flat file whose contents are comma delimited and there are 84 columns in total, so everytime I try to view the contents, things get over lapped it becomes diffcult to read through the result set. Is there a command / what would be the best way...if I want to view the results alligned... (4 Replies)
Discussion started by: priya33184
4 Replies

7. Shell Programming and Scripting

Comma delimited file manipulation

Question about how to change the first & last name in column one & two so that the names have a capital letter for just the first letter. Example: asdf@asdf.com,asdf,asdfasdf,176.23.22.345,4/12/2012 changed to: asdf@asdf.com,Asdf,Asdfasdf,176.23.22.345,4/12/2012 Thank you kindly, Nick (2 Replies)
Discussion started by: nickytcom
2 Replies

8. Shell Programming and Scripting

Need a script to convert comma delimited files to semi colon delimited

Hi All, I need a unix script to convert .csv files to .skv files (changing a comma delimited file to a semi colon delimited file). I am a unix newbie and so don't know where to start. The script will be scheduled using cron and needs to convert each .csv file in a particular folder to a .skv... (4 Replies)
Discussion started by: CarpKing
4 Replies

9. Shell Programming and Scripting

Help/Advise please for converting space delimited string variable to comma delimited with quote

Hi, I am wanting to create a script that will construct a SQL statement based on a a space delimited string that it read from a config file. Example of the SQL will be For example, it will read a string like "AAA BBB CCC" and assign to a variable named IN_STRING. I then concatenate... (2 Replies)
Discussion started by: newbie_01
2 Replies

10. 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
Parse::DMIDecode::Handle(3pm)				User Contributed Perl Documentation			     Parse::DMIDecode::Handle(3pm)

NAME
Parse::DMIDecode::Handle - SMBIOS Structure Handle Object Class SYNOPSIS
use Parse::DMIDecode qw(); my $decoder = new Parse::DMIDecode; $decoder->probe; for my $handle ($decoder->get_handles) { printf("Handle %s of type %s is %s bytes long (minus strings). ". " > Contians the following keyword data entries: ", $handle->handle, $handle->dmitype, $handle->bytes ); for my $keyword ($handle->keywords) { my $value = $handle->keyword($keyword); printf("Keyword "%s" => "%s" ", $keyword, (ref($value) eq 'ARRAY' ? join(', ',@{$value}) : ($value||'')) ); } } DESCRIPTION
METHODS
new Create a new struture handle object. This is called by Parse::DMIDecode's parse() (and indirectly by probe()) methods. raw my $raw_data = $handle->raw; Returns the raw data as generated by dmidecode that was parsed to create this handle object. bytes my $bytes = $handle->bytes; address my $address = $handle->address; Returns the address handle of the structure. handle Alias for address. dmitype my $dmitype = $handle->dmitype; type Alias for dmitype. description my $description = $handle->description; keywords my @keywords = $handle->keywords; Returns a list of keyword data pairs available for retreival from this handle object. keyword for my $keyword ($handle->keywords) { printf("Keyword "%s" => "%s" ", $keyword, $handle->keyword($keyword) ); } parsed_structures use Data::Dumper; my $ref = $handle->parsed_structures; print Dumper($ref); Returns a copy of the parsed structures. This should be used with care as this is a cloned copy of the parsed data structures that the Parse::DMIDecode::Handle object uses internally, and as such may change format in later releases without notice. SEE ALSO
Parse::DMIDecode VERSION
$Id: Handle.pm 976 2007-03-04 20:47:36Z nicolaw $ AUTHOR
Nicola Worthington <nicolaw@cpan.org> <http://perlgirl.org.uk> If you like this software, why not show your appreciation by sending the author something nice from her Amazon wishlist ? <http://www.amazon.co.uk/gp/registry/1VZXC59ESWYK0?sort=priority> COPYRIGHT
Copyright 2006 Nicola Worthington. This software is licensed under The Apache Software License, Version 2.0. <http://www.apache.org/licenses/LICENSE-2.0> perl v5.10.1 2009-12-02 Parse::DMIDecode::Handle(3pm)
All times are GMT -4. The time now is 11:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy