Sponsored Content
Top Forums Shell Programming and Scripting removing spaces after sperator Post 302069291 by gauravgoel on Friday 24th of March 2006 03:08:30 AM
Old 03-24-2006
do with sed
Quote:
sed 's/ //g' filename
 

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 spaces from variables?

I stored results like this VAR=`wc -l < ls.txt` But the value of the wc gave me a padded number. How do I strip the padding from $VAR? Do you think I could use SED? Except instead of a file input, have a variable redirection input? (2 Replies)
Discussion started by: yongho
2 Replies

3. Shell Programming and Scripting

Removing spaces at particular position

I have a file with delimiter ~ ABC~12~43~TR ~890~poi~YU ~56~65 What I want is to remove spaces from column 4,7 and other columns as it is So, the final file becomes ABC~12~43~TR~890~poi~YU~56~65 (7 Replies)
Discussion started by: superprogrammer
7 Replies

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

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

6. Shell Programming and Scripting

Removing spaces from data

Hi, I want to remove spaces from data. Data is: 1,aa ,21, 22 2,a a ,23 ,24 3, ,25 ,26 output should be: 1,aa,21,22 2,a a,23,24 3, ,25,26 i.e i have to remove leading and trailing spaces.Not the space between data and also i dont want to remove the space if data is... (4 Replies)
Discussion started by: monika
4 Replies

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

8. Shell Programming and Scripting

Removing spaces within Filename

Hello, I have a Folder (myfile) which contain the following files: P$12789865KR +N+01+OM+16102009165416.nu P$M1-508962GD +N+01+ALP+14102009094417.nu Is there a sed command(s) that will loop through this folder and remove the spaces that exists in the filename? Any help would be... (7 Replies)
Discussion started by: Fishn
7 Replies

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

10. Shell Programming and Scripting

Removing blanks, spaces

I have pipe separated file with lots of blank spaces. After using sed -e 's/ *| */|/g' this command ,its giving me output as TT0000013101640| HCAMBLAMCNB010|Jul 3 2012 11:14AM| HARYANA| Bangali Mohalla | TCL-UBR|9368040005|9355264655|9218509220|NULL ... (5 Replies)
Discussion started by: sususa
5 Replies
HTML::Auto(3pm) 					User Contributed Perl Documentation					   HTML::Auto(3pm)

NAME
HTML::Auto - automatic write HTML for common elements VERSION
Version 0.04 SYNOPSIS
Simple example: use HTML::Auto qw/matrix h v/; my @cols = qw/c1 c2 c3 c4 c5/; my @lines = qw/l1 l2 l3 l4 l5/; my $data = [ [1,2,3,4,5], [6,7,8,9,0], [1,1,1,1,1], [2,2,2,2,2], [3,3,3,3,3] ]; my $m = matrix(@cols,@lines,$data); print v( h($m,$m,$m), h($m,$m), ); Using attributes: use HTML::Auto qw/matrix h v/; my @cols = qw/c1 c2/; my @lines = qw/l1 l2/; my $data = [ [ {v => 1, a => { style => 'background: green'}}, 2 ], [ {v => 3, a => {class => 'foo'}}, {v => 4, a => {style => 'color: red'}} ] ]; my $m = matrix(@cols,@lines,$data); print v( h($m) ); With mouse-over span: use HTML::Auto qw/matrix h v/; my @cols = qw/c1 c2/; my @lines = qw/l1 l2/; my $data = [[1,2], [3, { v=> 4, more_info => "This is a pop-up!" }] ]; my $m = matrix(@cols,@lines,$data); print v( h($m) ); Passing additional CSS: use HTML::Auto qw/matrix h v/; my @cols = qw/c1 c2/; my @lines = qw/l1 l2/; my $data = [ [ {v => 1, a => { class => 'warn'}}, 2 ], [3,4] ]; my $options = { css => '.warn { background-color: yellow !important; }' }; my $m = matrix(@cols,@lines,$data,$options); print v( h($m) ); SUBROUTINES
/METHODS matrix h A function to allow horizontal composition. v A function to allow vertical composition. AUTHOR
Nuno Carvalho, "<smash at cpan.org>" Andre Santos, "<andrefs at cpan.org>" BUGS
Please report any bugs or feature requests to "bug-html-auto at rt.cpan.org", or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=HTML-Auto <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=HTML-Auto>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. SUPPORT
You can find documentation for this module with the perldoc command. perldoc HTML::Auto You can also look for information at: o RT: CPAN's request tracker http://rt.cpan.org/NoAuth/Bugs.html?Dist=HTML-Auto <http://rt.cpan.org/NoAuth/Bugs.html?Dist=HTML-Auto> o AnnoCPAN: Annotated CPAN documentation http://annocpan.org/dist/HTML-Auto <http://annocpan.org/dist/HTML-Auto> o CPAN Ratings http://cpanratings.perl.org/d/HTML-Auto <http://cpanratings.perl.org/d/HTML-Auto> o Search CPAN http://search.cpan.org/dist/HTML-Auto/ <http://search.cpan.org/dist/HTML-Auto/> ACKNOWLEDGEMENTS
LICENSE AND COPYRIGHT
Copyright 2012 Project Natura. This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License. See http://dev.perl.org/licenses/ for more information. perl v5.14.2 2012-06-05 HTML::Auto(3pm)
All times are GMT -4. The time now is 08:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy