Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 21 Sep 2014, 22:25
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
How to remove spaces from strings?
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
Lumaja

Joined: 17 Aug 2013
Posts: 1

PostPosted: Sat 17 Aug 2013, 09:30    Post_subject:  How to remove spaces from strings?  

Ubuntu 12.04 precise

I get this figures in different cells as strings but they can be converted to numbers without the spaces.

786 879
3 825 647
4 612 526

How to convert them
Thank you
Back to top
View user's profile Send_private_message 
L18L

Joined: 19 Jun 2010
Posts: 2505
Location: Burghaslach, Germany somewhere also known as "Hosla"

PostPosted: Sat 17 Aug 2013, 09:59    Post_subject:  

Code:
# echo "123 456" |  sed 's/ //g'
123456
#
Back to top
View user's profile Send_private_message 
don570


Joined: 10 Mar 2010
Posts: 3289
Location: Ontario

PostPosted: Sat 17 Aug 2013, 15:34    Post_subject:  

You can avoid using sed by using a string operation.

It's explained well in the Advanced Bash scripting guide

http://www.tldp.org/LDP/abs/html/refcards.html#AEN22664
___________________________________________________
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0426s ][ Queries: 11 (0.0038s) ][ GZIP on ]