Re: removing blanks from a file
- From: glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxx>
- Date: Thu, 29 Jun 2006 17:26:45 -0700
Bil Kleb wrote:
Luka Djigas wrote:
I have a file, which is the output of one of my programs. It's a
script file, and therefore it's not supposed to have blanks in it.
I don't completely understand the "script file" statement
so this may be way off the mark, but I'd just use a dynamic
language or a *nix filter like awk to remove the spaces
from the file, e.g.,
The usual set of unix utilities includes a program called tr that
can do this. There is a set of such utilities that will run as
command line utilities under 32 bit windows. I should have the URL,
but I don't have it right now. I think it is also part of the
"Services for Unix" package from microsoft, available as a free
download.
tr -d ' ' < infile > outfile
(The command line quoting conventions are different under windows.)
This is most likely much faster than a Fortran program, if you have
large files.
-- glen
.
- Follow-Ups:
- Re: removing blanks from a file
- From: e p chandler
- Re: removing blanks from a file
- References:
- removing blanks from a file
- From: Luka Djigas
- Re: removing blanks from a file
- From: Bil Kleb
- removing blanks from a file
- Prev by Date: Re: removing blanks from a file
- Next by Date: Re: removing blanks from a file
- Previous by thread: Re: removing blanks from a file
- Next by thread: Re: removing blanks from a file
- Index(es):
Relevant Pages
|