09-07-2012
Try this:
cat "File Name" | sed -e 's/ /,/g'
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am new to unix shell shell scripting. I have a specific requirement where I need to append comma's based on the max number of column in the file.
Eg:
If my source file look something like this,
sengwa,china
tom,america,northamerica
smith,america
walter
My output file... (8 Replies)
Discussion started by: nicholas_ejn
8 Replies
2. Shell Programming and Scripting
Hi,
I am trying to truncate word after comma in a file ONLY if there are already 2 words BEFORE comma. If there is one word or 3 or more words BEFORE comma, then I have to leave the data AS IS. See below for example.
Input File :
John Smith, Manager
Smith, John Frank
J F K... (2 Replies)
Discussion started by: msalam65
2 Replies
3. UNIX for Dummies Questions & Answers
Hi all,
I have a text file and I need to insert comma after every 2 digit.
-1-1-1-1-1-1-1-1-1 0 0 0
-1-1-1 2 0 0 3 311-1 0 1
-1-1 021 0 011-1-1 033 0I'd like to have this:
-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0
-1,-1,-1, 2, 0, 0, 3, 3,11,-1, 0, 1
-1,-1, 0,21, 0, 0,11,-1,-1, 0,33, 0Thanks for... (7 Replies)
Discussion started by: GoldenFire
7 Replies
4. Shell Programming and Scripting
I am trying to search the pattern "ARS (11)" and after the LAST pattern, i am trying to open new line and enter text using sed.
My Existing Text file is Users.txtpaul, Paul Smith, Stevn Smiley, REQ000001, ARS (11)
sam, Sam Martin, Stevn Smiley, REQ000001, ARS (11)
mike, Mike Conway, Stevn... (8 Replies)
Discussion started by: evrurs
8 Replies
5. Shell Programming and Scripting
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)
Discussion started by: manigrover
5 Replies
6. Shell Programming and Scripting
Hello there,
I have a comma separated csv , and all the text field is wrapped by double quote. Issue is some text field contain comma as well inside double quote. so it is difficult to process.
Input in the csv file is ,
1,234,"abc,12,gh","GH234TY",34
I need output like below,... (8 Replies)
Discussion started by: Uttam Maji
8 Replies
7. Shell Programming and Scripting
Having a huge file in the following format.
2,3,1,,,4
1,2,3,,,,,5,
8,7,3,4,,,,
Output needed is:
2,3,1,0.0,0.0,4
1,2,3,0.0,0.0,0.0,0.0,5,
8,7,3,4,0.0,0.0,0.0,
I have tried reading the file each line, using AWK to parse to find out ",," and then insert 0.0 . It works but very slow. Need... (8 Replies)
Discussion started by: wincrazy
8 Replies
8. Shell Programming and Scripting
Hello,
I have a text file as:-ABC
BCD
CDF
DEF
EFGI need to convert as 'ABC', 'BCD', 'CDF', 'DEF', 'EFG' using a unix command
anybody can help me out on this.
Regards,
Jas
Please wrap all code, files, input & output/errors in CODE tags.
It makes them easier to read and preserves... (12 Replies)
Discussion started by: jassi10781
12 Replies
9. Shell Programming and Scripting
Hi All,
I have a file which has data like
a,b
c,d
e,f
g,h
And I need to insert a new column at the begining with sequence no( 1 to n)
1,a,b
2,c,d
3,e,f
4,g,h
Please let me know how to acheive this in unix (3 Replies)
Discussion started by: weknowd
3 Replies
10. Shell Programming and Scripting
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
LEARN ABOUT FREEBSD
gss_indicate_mechs
GSS_INDICATE_MECHS(3) Programmer's Manual GSS_INDICATE_MECHS(3)
NAME
gss_indicate_mechs -- Determine available underlying authentication mechanisms
SYNOPSIS
#include <gssapi/gssapi.h>
OM_uint32
gss_indicate_mechs(OM_uint32 *minor_status, gss_OID_set *mech_set);
DESCRIPTION
Allows an application to determine which underlying security mechanisms are available.
PARAMETERS
minor_status Mechanism specific status code.
mech_set Set of implementation-supported mechanisms. The returned mech_set value will be a dynamically-allocated OID set, that should
be released by the caller after use with a call to gss_release_oid_set().
RETURN VALUES
GSS_S_COMPLETE Successful completion
SEE ALSO
gss_release_oid_set(3)
STANDARDS
RFC 2743 Generic Security Service Application Program Interface Version 2, Update 1
RFC 2744 Generic Security Service API Version 2 : C-bindings
HISTORY
The gss_indicate_mechs function first appeared in FreeBSD 7.0.
AUTHORS
John Wray, Iris Associates
COPYRIGHT
Copyright (C) The Internet Society (2000). All Rights Reserved.
This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or
assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, pro-
vided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself
may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organiza-
tions, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet
Standards process must be followed, or as required to translate it into languages other than English.
The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.
This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK
FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT
INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
BSD
January 26, 2010 BSD