![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| trimming zeros | mohan705 | UNIX for Advanced & Expert Users | 3 | 03-23-2008 07:38 AM |
| trimming white spaces | briskbaby | Shell Programming and Scripting | 9 | 09-23-2006 03:10 PM |
| Trimming a string | fastgoon | Shell Programming and Scripting | 2 | 07-27-2006 09:02 AM |
| spaces trimming while assigning to a variable | Lokesha | SUN Solaris | 2 | 06-06-2006 11:09 PM |
| trimming a file... | alwayslearningunix | UNIX for Dummies Questions & Answers | 1 | 04-23-2001 11:33 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Trimming the spaces
Hi,
How can I remove the unwanted spaces in the line. 123456 789 ABC DEF. - I wanna remove the sapces in this line, I need the output 123456789ABCDEF. Pls help me...... |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
example:
Code:
echo "1 2 3 4 5" |tr -d [:SPACE:] will do the trick /peter Last edited by radoulov; 07-07-2008 at 02:43 AM. Reason: added code tags |
|
#3
|
|||
|
|||
|
Code:
echo 123456 789 ABC DEF | sed "s/ //g" Last edited by radoulov; 07-07-2008 at 02:43 AM. Reason: added code tags |
|
#4
|
|||
|
|||
|
Code:
$ str="123456 789 ABC DEF."
$ print ${str// /}
123456789ABCDEF.
$
|
|||
| Google The UNIX and Linux Forums |