If you don't mind dropping the spaces between fields in your output (which aren't usually desired in a comma separated values file anyway), this seems simpler:
With your sample input, it produces the output:
This User Gave Thanks to Don Cragun For This Post:
The auditors have nailed us for world writeable files....
Apparently in years gone by, quite a number of our kornshell scripts have had:
umask 000 put in the script.
We have been able to turn off world writeable for existing dirs & files, but as these scripts run, new files keep getting... (1 Reply)
I would like to know code that will delete multiple text from a comma delimited file. For example, how would the comma delimited file below delete the word 'PEST' in Perl language (previously an excel file that was converted to a csv and the last column was PEST):
1, 2,43,34, bosx,PEST
1,... (1 Reply)
Situation:
Our system currently executes a job (COBOL Program) that generates an interface file to be sent to one of our vendors. Because this system processes information for over 100,000 employees/retirees (and growing), we'd like to multi-thread the job into processing-groups in order to... (4 Replies)
Is it possible to place a comma in the desired places, like 10spaces after or 15 spaces after, irrespective of the contents???
Ex:File: TEST
TEST:
vimalthomaswants to place a comma
can he do it in the desired places?
as per the above file, i need to place a comma after 10th space... (4 Replies)
Hi all,
I have a file in which I have to insert commna between entries of 2 column and createa new file separated by commas not a columns
if input is
FHIT Adenosine Monotungstate Not Available
CS Trifluoroacetonyl Coenzyme A Not Available
Theo expected output is
... (5 Replies)
Hi All,
I am trying to merge all the text files into one file using below snippet
cat /home/Temp/Test/Log/*.txt >> all.txt
But it seems it is not working.
I have multiple files like Output_ServerName1.txt, Output_ServreName2.txt
I want to merge each file into one single file and... (6 Replies)
Hi,
Please excuse for often requesting queries and making R&D, I am trying to work out a possibility where i have two files field separated by pipe and another file containing only one field where there is no matching columns, Could you please advise how to merge two files.
$more... (3 Replies)
Hello,
I'm back again looking for your precious help-
This time I need to merge two text files with matching two fields, output only common records with mixed output.
Let's look at the example:
FILE1
56153;AAA0708;3;TEST1TEST1;
89014;BBB0708;3;TEST2TEST2;
89014;BBB0708;4;TEST3TEST3;
... (7 Replies)
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
LEARN ABOUT DEBIAN
debian::control::stanza::commaseparated
Debian::Control::Stanza::CommaSeparated(3pm) User Contributed Perl Documentation Debian::Control::Stanza::CommaSeparated(3pm)NAME
Debian::Control::Stanza::CommaSeparated - comma separated debian/control field abstraction
SYNOPSYS
my $f = Debian::Control::Stanza::CommaSeparated->new(
'Joe M <joem@there.not>');
$f->add('"Smith, Agent" <asmith@hasyou.not>, Joe M <joem@there.not>');
print $f->as_string;
# 'Joe M <joem@there.not>, "Smith, Agent" <asmith@hasyou.not>'
print "$f"; # the same
$f->sort;
DESCRIPTION
Debian::Control::Stanza::CommaSeparated abstracts handling of comma-separated list of values, often found in debian/control file fields
like Uploaders. Note that the various dependency fields in debian/control also use comma-separated values, but the Debian::Dependencies
class is more suitable for these as it is for example also capable of finding overlapping dependency declarations.
CONSTRUCTOR
new (initial values)
The initial values list is parsed and may contain strings that are in fact comma-separated lists. These are split appropriately using
Text::ParseWords' quotewords routine.
METHODS
as_string
Returns text representation of the list. A simple join of the elements by ", ".
The same function is used for overloading the stringification operation.
add @items
Adds the ginen items to the list. Items that are already present are not added, keeping the list unique.
sort
A handy method for sorting the list.
perl v5.14.2 2012-01-15 Debian::Control::Stanza::CommaSeparated(3pm)