vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hello, I want to kill spaces and tabs from a line. But sed -e 's/^[ \t]*//;' filename is not working. \t will not be recognized. What can I do? My workarount now is to write a shellscript and manipulate the command there in the manner that I insert a '09' instead of the \t with a hexedit. Then it works. What's wrong? Greetings Rick |
| |||
| Hi Richard, Richard Gotthold <RickG@myfaz.net> wrote: > > I want to kill spaces and tabs from a line. But > > sed -e 's/^[ \t]*//;' filename > > is not working. \t will not be recognized. What can I do? My workarount now > is to write a shellscript and manipulate the command there in the manner > that I insert a '09' instead of the \t with a hexedit. Then it works. to complicated > What's wrong? Don't write \t press between the ticks '<ctrl>-<v> and then <tab>'... thyes@lila $ cat test test test test test thyes@lila $ cat test | sed s/' '//g test test test test hth Frank -- I hear strange voices and they don't like you! |
| |||
| Hi Richard, Richard Gotthold <RickG@myfaz.net> wrote: > > I want to kill spaces and tabs from a line. But > > sed -e 's/^[ \t]*//;' filename > > is not working. \t will not be recognized. What can I do? My workarount now > is to write a shellscript and manipulate the command there in the manner > that I insert a '09' instead of the \t with a hexedit. Then it works. to complicated > What's wrong? Don't write \t press between the ticks '<ctrl>-<v> and then <tab>'... thyes@nibbler $ cat test test test test test thyes@nibbler $ cat test | sed s/' '//g test test test test hth Frank -- I hear strange voices and they don't like you! |
| |||
| In article <Xns93AEB2D9E500BRickGatmyfazdotnet@130.133.1.4> , Richard Gotthold wrote: >I want to kill spaces and tabs from a line. But > >sed -e 's/^[ \t]*//;' filename tr -d ' \t' < filename or perl -nle 's/\s//g; print' filename ^ ^ ____ / \___ use "g" to kill all spaces, not just the first perl's "\s" means whitespace, "\S" is non-whitespace -- tinned meat supplier <info@mail.aluminumfloors.com> |