Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Remove whitespaces between comma separated fields from file Post 302205164 by nitinbjoshi on Friday 13th of June 2008 08:21:00 PM
Old 06-13-2008
Remove whitespaces between comma separated fields from file

Hello all,

I am a unix dummy. I am trying to remove spaces between fields. I have the file in the following format


12332432, 2345 , asdfsdf ,100216 , 9999999
12332431, 2341 , asdfsd2 ,100213 , 9999999

& would like to make it

12332432,2345,asdfsdf,100216,9999999
12332431,2341,asdfsd2,100213,9999999

I would appreciate it greatly if there is a command to do this.

Thanks
Nitin
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Parse apart strings of comma separated data with varying number of fields

I have a situation where I am reading a text file line-by-line. Those lines of data contain comma separated fields of data. However, each line can vary in the number of fields it can contain. What I need to do is parse apart each line and write each field of data found (left to right) into a file.... (7 Replies)
Discussion started by: 2reperry
7 Replies

2. Shell Programming and Scripting

Comma separated file

Hi all, I have the following files types: FileA: 100, 23, 33, FileB: 22, 45, 78, and i want to make File C: 100,22 23,45 33,78 any nice suggestions for making it easy. (3 Replies)
Discussion started by: hen1610
3 Replies

3. Shell Programming and Scripting

Need Help - comma inside double quote in comma separated csv,

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

4. Shell Programming and Scripting

How to split the comma separated file?

Hi, I have a filein unix like ABC,CDE BCD,KHL and the output i need is like column1 column2 ABC,CDE ABC ABC,CDE CDE BCD,KHL BCD BCD,KHL KHL. Can some body help me out? Hi, The code is working fine. But in my file each row does not have always 1 comma. It may... (6 Replies)
Discussion started by: jagdishrout
6 Replies

5. UNIX for Dummies Questions & Answers

[solved] Comma separated values to space separated

Hi, I have a large number of files which are written as csv (comma-separated values). Does anyone know of simple sed/awk command do achieve this? Thanks! ---------- Post updated at 10:59 AM ---------- Previous update was at 10:54 AM ---------- Guess I asked this too soon. Found the... (0 Replies)
Discussion started by: lost.identity
0 Replies

6. Shell Programming and Scripting

awk print - fields separated with comma's need to ignore inbetween double quotes

I am trying to re-format a .csv file using awk. I have 6 fields in the .csv file. Some of the fields are enclosed in double quotes and contain comma's inside the quotes. awk is breaking this into multiple fields. Sample lines from the .csv file: Device Name,Personnel,Date,Solution... (1 Reply)
Discussion started by: jxrst
1 Replies

7. 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

8. Shell Programming and Scripting

Convert fixed value fields to comma separated values

Hi All, Hope you are doing Great!!!. Today i have came up with a problem to say exactly it was for performance improvement. I have written code in perl as a solution for this to cut in specific range, but it is taking time to run for files thousands of lines so i am expecting a sed... (9 Replies)
Discussion started by: mad man
9 Replies

9. UNIX for Beginners Questions & Answers

How to extract fields from a CSV i.e comma separated where some of the fields having comma as value?

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

10. UNIX for Beginners Questions & Answers

Remove duplicates from comma separated list

Hi, I have following input file: niki niki niki1 niki niki2 niki,niki2 niki3 niki,niki3,niki niki4 niki4,blabla niki5 jkjkl niki6 niki60,niki6 I would like to delete lines with identical matches completely and remove the selfmatches in the other lines. ... (2 Replies)
Discussion started by: niki0211
2 Replies
DH_MAKECLILIBS(1)				Debhelper for CLI (Common Language Infrastructure)				 DH_MAKECLILIBS(1)

NAME
dh_makeclilibs - automatically create clilibs file SYNOPSIS
dh_makeclilibs [debhelper options] [-r] [-V[dependancies]] [-mminversion] [-lnextincompatible] [-Xitem] DESCRIPTION
dh_makeclilibs is a debhelper program that automatically scans for versioned CIL (.NET) assemblies, and generates a clilibs file for the libraries it finds. By default, dh_makeclilibs scans the .dll files in the package directories and writes the discovered compatibility data (major/minor, build, token) to "clilibs" files in the appropriate packages. However, if a file like debian/package.clilibs is found, this one will be installed and no scanning is performed. OPTIONS
-V, -Vdependancies --version-info, --version-info=dependancies By default, the clilibs file generated by this program does not make packages depend on any particular version of the package containing the assembly. It may be necessary for you to add some version dependency information to the clilibs file. If -V is specified with no dependency information, the current version of the package is plugged into a dependency that looks like "packagename (>= packageversion)". If -V is specified with parameters, the parameters can be used to specify the exact dependency information needed (be sure to include the package name). Beware of using -V without any parameters; this is a conservative setting that always ensures that other packages' shared library dependencies are at least as tight as they need to be, so that if the maintainer screws up then they won't break. The flip side is that packages might end up with dependencies that are too tight and so find it harder to be upgraded. -mminversion Like -V, but specifies only the version string, the package name comes from the package that is actually processed. This option is more flexible if you try to set a range of valid versions for different assembly packages coming from one source package. -lnextincompatible Specifies the (expected) version of this package when the compatibility to the current assemblies will break. -r An experimental option to automaticaly guess the next incompatible upstream version and insert them (like working with -l and -m options, see above). Do not expect the guessed values to be always correct - normally, the usualy assumed version string has the form generation.major.minor where versions with changes in "minor" are compatible and "major" versions break with compatibility. -Xitem, --exclude=item Exclude files that contain "item" anywhere in their filename or directory from being treated as shared libraries. --internal-mono Uses the Mono runtime in . (used for bootstrapping Mono packages) EXAMPLES
dh_makeclilibs Assuming this is a package named libfoobar0.9x-cil, generates a clilibs file that looks something like: libfoobar 1.0.2345.0_23a12f34 libfoobar0.9x-cil dh_makeclilibs -V Assuming the current version of the package is 0.93-3, generates a clilibs file that looks something like: libfoobar 1.0.2345.0_23a12f34 libfoobar0.9x-cil (>= 0.93-3) dh_makeclilibs -V 'libfoobar0.9x-cil (>= 0.92)' Generates a clilibs file that looks something like: libfoobar 1.0.2345.0_23a12f34 libfoobar0.9x-cil (>= 0.92) Assuming that your package creates libfoobar-cil and liblafasel-cil, which are compatible to 0.92 versions but the upstream is going to break compatibility in the next version, 0.94: dh_makeclilibs -m 0.92 -l 0.94 Generates clilibs file that looks something like: libfoobar 1.0.2345.0_23a12f34 libfoobar-cil (>= 0.92), libfoobar-cil (<< 0.94) and liblafasel 1.0.2345.0_23a12f34 liblafasel-cil (>= 0.92), liblafasel-cil (<< 0.94) SEE ALSO
debhelper(7) This program is a part of cli-common-dev. KNOWN BUGS
Will possibly not work correctly with DH_COMPAT levels 1 and 2. AUTHOR
Mirco Bauer <meebey@meebey.net>, Eduard Bloch <blade@debian.org>, inspired by dh_makeshlibs by Joey Hess <joeyh@debian.org> perl v5.14.2 2012-01-17 DH_MAKECLILIBS(1)
All times are GMT -4. The time now is 03:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy