![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| remove spaces btw | tjmannonline | UNIX for Dummies Questions & Answers | 7 | 05-26-2008 02:35 AM |
| sh, ksh: command to remove front spaces from a string? | pseudocoder | Shell Programming and Scripting | 3 | 09-22-2007 07:57 AM |
| How to remove trailing spaces | mahek_bedi | UNIX for Dummies Questions & Answers | 2 | 08-10-2007 07:21 AM |
| remove blank spaces in a string | spandu | Shell Programming and Scripting | 2 | 03-02-2006 02:08 AM |
| Variable has spaces around the string, need to remove them | mikey20 | Shell Programming and Scripting | 4 | 10-13-2005 08:09 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
how to remove spaces in a string using sed.
Hello,
I have the following to remove spaces from beginning and end of a string. infile=`echo "$infilename" | sed 's/^ *//;s/ *$//` How do I modify the above code to remove spaces from beginning, end and in the middle of the string also. ex: Shell Programming is fun Result should be: ShellProgrammingisfun ThankYou, Radhika. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|