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 DEBIAN
pmfunc
PMFUNC(1p) User Contributed Perl Documentation PMFUNC(1p)
NAME
pmfunc - cat out a function from a module
DESCRIPTION
Given a fully-qualified function, this program opens up the file and attempts to cat out the source for that function.
EXAMPLES
$ pmfunc Cwd::getcwd
sub getcwd
{
abs_path('.');
}
RESTRICTIONS
Only subroutines that are defined in the normal fashion are seen, since a simple pattern-match is what does the extraction. Those loaded
other ways, such as via AUTOLOAD, typeglob aliasing, or in an "eval", will all necessarily be missed.
This is mostly here for people who are too lazy to type
sed '/^sub getcwd/,/}/p' `pmpath Cwd`
or
perl -ne 'print if /^subs+getcwd/ .. /}/' `pmpath Cwd`
RESTRICTIONS
SEE ALSO
AUTHORS and COPYRIGHTS
Copyright (C) 1999 Tom Christiansen.
Copyright (C) 2006-2008 Mark Leighton Fisher.
This is free software; you can redistribute it and/or modify it under the terms of either: (a) the GNU General Public License as published
by the Free Software Foundation; either version 1, or (at your option) any later version, or (b) the Perl "Artistic License". (This is the
Perl 5 licensing scheme.)
Please note this is a change from the original pmtools-1.00 (still available on CPAN), as pmtools-1.00 were licensed only under the Perl
"Artistic License".
perl v5.10.1 2010-02-22 PMFUNC(1p)