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 Sat 20 Sep 2014, 18:24
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 [3 Posts]  
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 from previous:   Sort by:   
Page 1 of 1 [3 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0471s ][ Queries: 12 (0.0076s) ][ GZIP on ]