06-16-2008
Hi,
try the following simple solution:
cat filename | sed 's/ /,/g'
the example above looks for 2 spaces and subtitutes it with a comma
Hope this helps,
Don
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
how to convert the result of the select query to comma seperated data and put in a .csv file using korn shell.
Pls help me as its very urgent.
Thanks,
Hema. (1 Reply)
Discussion started by: Hemamalini
1 Replies
2. Shell Programming and Scripting
Hi,
I want to remove empty/blank lines from comma seperated and space seperated files
Thanks all for help (11 Replies)
Discussion started by: pinnacle
11 Replies
3. Shell Programming and Scripting
Hi All,
I need to convert an exel spreadsheet into a SAS dataset,
and the following format change is needed. Please help, this is too complex
for a biologist.
Let me describe the input.
1st row is generation.1st column in keyword 'generation', starting 2nd column there are 5... (9 Replies)
Discussion started by: newbie83
9 Replies
4. Shell Programming and Scripting
Hi,
I have a data file with :
01/28/2012,1,1,98995
01/28/2012,1,2,7195
01/29/2012,1,1,98995
01/29/2012,1,2,7195
01/30/2012,1,1,98896
01/30/2012,1,2,7083
01/31/2012,1,1,98896
01/31/2012,1,2,7083
02/01/2012,1,1,98896
02/01/2012,1,2,7083
02/02/2012,1,1,98899
02/02/2012,1,2,7083
I... (1 Reply)
Discussion started by: himanish
1 Replies
5. Shell Programming and Scripting
Hi,
I have directory with multiple files from which i need to extract portion of specif lines and insert it in a new file, the new file will contain a separate columns for each file data.
Example:
I need to extract Value_1 & Value_3 from all files and insert in output file as below:
... (2 Replies)
Discussion started by: belalr
2 Replies
6. Shell Programming and Scripting
How can i convert the below data to a simpler format :-
cat tabular.txt
User 1 Details :-
First Name = Tom
Middle Name =
Last Name = Hanks
Age = 40
Address =
User 2 details :-
First Name = Mike
Middle Name =
Last Name = Tyson
Age = 50
Address = (2 Replies)
Discussion started by: lazydev
2 Replies
7. Shell Programming and Scripting
Dear Friends,
I am in urgent need for awk/sed/sh script for converting a specific data format (.txt) to .xls.
The input is as follows:
>gi|1234|ref|
Query = 1 - 65, Target = 1677 - 1733
Score = 8.38, E = 0.6529, P = 0.0001513, GC = 46
fd sdfsdfsdfsdf
fsdfdsfdfdfdfdfdf... (6 Replies)
Discussion started by: Amit1
6 Replies
8. Shell Programming and Scripting
Hi ,
i am generating some data by firing sql query with connecting to the database by my solaris box.
The below one should be the header line of my excel ,here its coming in separate row.
TO_CHAR(C. CURR_EMP_NO
---------- ---------------
LST_NM... (6 Replies)
Discussion started by: dani1234
6 Replies
9. Programming
Here is the code that I am working with. I have tried several other things. any suggestions?
Lbl_Cost_Output.Text = (dDistance * dCostPerMile).ToString("C")
The label is formatted correctly in terms of value 0.00 but no dollar sign appears. Please let me know if you have any questions. (1 Reply)
Discussion started by: briandanielz
1 Replies
10. Shell Programming and Scripting
Hi All,
I am new to shell scripting i am trying to convert the listner.log to csv which can be inturn converted to excel for easy reading.
i used this command
awk '/SID=/ && /HOST=/ && /PORT=/ && /USER=/ {
i=match($0,"SID="); i=i+RLENGTH; h0=substr($0,i);
i=match(h0,")");... (6 Replies)
Discussion started by: skoshekay
6 Replies
LEARN ABOUT CENTOS
reposdump
REPOSDUMP(1) Linux Programmers Manual REPOSDUMP(1)
NAME
reposdump - utility for dumping SBLIM Data Gatherer online metric repository
SYNOPSIS
reposdump [age] [interval] [directory]
DESCRIPTION
The reposdump program is used to dump the metrics from the reposd(8) daemons online repository. The metric data is exported into a flat
text file. The file contains sections seperated by lines with the following format.
===metricdefs <pluginname>===
===metricvals <pluginname>===
Each section contains a list of comma seperated records containing the defined metric or metric values. A sample perl script
/usr/share/reposd2csv.pl is included which demonstrates converting the dump data into a comma seperated value list (CSV) suitable for
import into a spreadsheet.
OPTIONS
age
Maximum sample age in seconds to be dumped.
interval
Sample interval granularity in seconds to be dumped.
directory
Directory in which to dump metric file.
BUGS
The SBLIM project maintains a mailing list to which you should direct all questions regarding sfcb, sfcc, wbemcli, the metric data
gatherer, or any of the SBLIM providers. To subscribe to this list visit:
https://lists.sourceforge.net/lists/listinfo/sblim-issues
Please report bugs you discover to the bug tracker. The SBLIM project bug tracking page can be found at:
https://sourceforge.net/tracker/?group_id=128809&atid=712784
AUTHORS
Please refer to the AUTHORS file distributed with sblim-gather.
COPYRIGHT
Copyright (C) 2003-2012 IBM Corp.
LICENSE
reposdump is distributed under the terms of the Eclipse Public License ("Agreement"). Any use, reproduction or distribution of this program
constitutes recipeients acceptance of the agreement.
You can obtain a current copy of the Eclipse Public License from http://www.opensource.org/licenses/eclipse-1.0.php
SEE ALSO
reposd(8)
sblim-gather-2.2.8 06/17/2014 REPOSDUMP(1)