Sponsored Content
Full Discussion: Removing spaces from data
Top Forums Shell Programming and Scripting Removing spaces from data Post 302255365 by joeyg on Thursday 6th of November 2008 10:04:07 AM
Old 11-06-2008
Hammer & Screwdriver all in sed...

this does it, although it can probably be simplified

Code:
> cat file37
1,aa ,21, 22
2,a a ,23 ,24
3, ,25 ,26
> sed "s/, ,/,~,/g" <file37 | sed "s/ ,/,/g" | sed "s/, /,/g" | sed "s/~/ /g"
1,aa,21,22
2,a a,23,24
3, ,25,26

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

removing spaces in a file

I have output a file and need to remove blank spaces in the first lines only so the file is left end justified. I need to do this while keeping the rest of the file intact. Example of file that needs spaces removed: space space space space space space space... (3 Replies)
Discussion started by: tioray
3 Replies

2. UNIX for Dummies Questions & Answers

Removing leading and trailing spaces of data between the tags in xml.

I am having xml document as below. <transactionid> 00 </transactionid> <tracknumber> 0 </tracknumber> <key> N/A </key> But the data contains leading and trailing spaces between the tags. Please let me know how can i remove these leading and trailing spaces between the tags.... (2 Replies)
Discussion started by: jhmr7
2 Replies

3. UNIX for Dummies Questions & Answers

Removing spaces between records

Hi I have an XML file. Which has spaces between different records.... current file( Has many lines, like this... I want to delete all the spaces between > and <, if there are only spaces between them) input file <xyzr> <abc>1234</xyzr> <aaa> <bbb> ayz mnz</bbb> <sen>KEA... (6 Replies)
Discussion started by: thanuman
6 Replies

4. Shell Programming and Scripting

removing spaces after sperator

Hi friends i have problem 6000000001| CDC049| 109| CDC| 02/02/2006| Auto| New Add| 02/03/2006 6000000002| CDC033| 109| CDC| 02/02/2006| Auto| New Add| 02/03/2006 6000000003| CDC037| 109| CDC| 02/02/2006| Auto| New Add| 02/03/2006 6000000004| CDC031| ... (6 Replies)
Discussion started by: vishnu_vaka
6 Replies

5. Shell Programming and Scripting

removing spaces

hey.. i had a problem with the unix command when i want to remove the white spaces in a string..i guess i cud do it with a sed command but i get an error when i give space in the square brackets.. string="nh hjh llk" p=`echo $string | sed 's/ //g'` i donno how to give space charater and... (2 Replies)
Discussion started by: sahithi_khushi
2 Replies

6. UNIX for Dummies Questions & Answers

Removing spaces...

Hey, I'm using the command from this thread https://www.unix.com/unix-dummies-questions-answers/590-converting-list-into-line.html to convert vertical lines to horzontal lines. But I need to remove the spaces that is created. Unfortunately I can't figure out where the space is in the code.. I... (2 Replies)
Discussion started by: lost
2 Replies

7. Shell Programming and Scripting

Removing spaces from string

I want a user to be able to paste in a string like "01 3F 20 1F" and have the script reformat it to "013F201F" to pass it on to the next step. I was trying to figure it out with awk but wasnt working well. Never mind, found answer. did not know about tr :) (7 Replies)
Discussion started by: ippy98
7 Replies

8. Shell Programming and Scripting

Removing blank spaces, tab spaces from file

Hello All, I am trying to remove all tabspaces and all blankspaces from my file using sed & awk, but not getting proper code. Please help me out. My file is like this (<b> means one blank space, <t> means one tab space)- $ cat file NARESH<b><b><b>KUMAR<t><t>PRADHAN... (3 Replies)
Discussion started by: NARESH1302
3 Replies

9. Shell Programming and Scripting

Removing spaces in a line

Hi All, I have a line like this " field1;field2;field3 " (single space after and before double quotes). Now i have to remove these single space . Kindly help me. Thanks in advance (2 Replies)
Discussion started by: krishna_gnv
2 Replies

10. Shell Programming and Scripting

awk for removing spaces

HI, I have a file with lot of blank lines, how can I remove those using awk?? Thanks, Shruthi (4 Replies)
Discussion started by: shruthidwh
4 Replies
NE_SSL_CERTIFICATE(3)						neon API reference					     NE_SSL_CERTIFICATE(3)

NAME
ne_ssl_certificate, ne_ssl_dname - structures representing SSL certificates SYNOPSIS
#include <ne_session.h> /* A simplified X.509 distinguished name. */ typedef struct { const char *country, *state, *locality, *organization; const char *organizationalUnit; const char *commonName; } ne_ssl_dname; /* A simplified SSL certificate. */ typedef struct { const ne_ssl_dname *subject, *issuer; const char *from, *until; } ne_ssl_certificate; DESCRIPTION
The ne_ssl_dname structure is used to represent a simplified X.509 distinguished name, as used in SSL certificates; a distinguished name is used to uniquely identify an entity. Along with the fields giving the geographical and organizational location of the entity, the common- Name field will be assigned the DNS hostname of the entity. The ne_ssl_readable_dname function can be used to create a single-line string out of an ne_ssl_dname structure. The ne_ssl_certificate structure is used to represent a simplified SSL certificate; containing the distinguished names of the issuer and subject of the certificate. The issuer is the entity which has digitally signed the certificate to guarantee its authenticity; the subject is the owner of the certificate. A certificate is only valid for a certain period of time: the from and until contain strings giving the validity period. SEE ALSO
ne_ssl_dname(3), ne_ssl_set_verify(3) AUTHOR
Joe Orton <neon@webdav.org>. neon 0.23.5 8 October 2002 NE_SSL_CERTIFICATE(3)
All times are GMT -4. The time now is 11:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy