![]() |
|
|
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 trailing and leading spaces using tr command | sureshg_sampat | Shell Programming and Scripting | 5 | 03-04-2009 05:04 AM |
| sed over writes my original file (using sed to remove leading spaces) | laser | Shell Programming and Scripting | 6 | 12-02-2008 10:48 AM |
| Replacing leading zeros with leading spaces | deepakwins | UNIX for Dummies Questions & Answers | 5 | 06-18-2008 03:06 AM |
| remove leading spaces from a line | lijojoseph | Shell Programming and Scripting | 6 | 03-17-2008 05:29 AM |
| Strip leading and trailing spaces only in a shell variable with embedded spaces | jerardfjay | Shell Programming and Scripting | 6 | 03-07-2005 02:24 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Not able to remove leading spaces
Hi Experts, In a file tht i copied from the web , i am not able to remove the leading white spaces. I tried the below , none of them working . I opened the file through vi to check for the special characters if any , but no such characters found. Your advice will be greatly appreciated. Code:
sed 's/^\s*//g' file_name.txt sed 's/^[ \t]*//g' file_name.txt sed 's/^[ \t]*//' file_name.txt sed 's/ //g' file_name.txt |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|