Complete.Org: Mailing Lists: Archives: discussion: September 1998:
Re: [aclug-L] question
Home

Re: [aclug-L] question

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: aclug-L@xxxxxxxxxxxx
Subject: Re: [aclug-L] question
From: Thomas Wallis <wallis@xxxxxxxxxxx>
Date: Thu, 10 Sep 1998 10:06:18 -0500 (CDT)
Reply-to: aclug-L@xxxxxxxxxxxx

On Thu, 10 Sep 1998, Wesley Simon wrote:

> Does anyone know the syntax for a fancy tr command that I can put into a
> makefile so that it will strip the carriage return (^M) off each .c and
> .h file in a directory?  I used to have such a makefile, but I seem to
> have lost it during my last install.  If not, does anyone know a simple
> way of doing it?  I have about 30 files in a single directory.  I did
> several via command-line with "mv file.txt file.bak; tr -d '\r' <
> file.bak > file.txt", but that got a little tedious.  I'm doing some
> porting of some C programs and plan on doing this quite regularly, so I
> don't want to manually do it each time.  Any suggestions would be
> helpful.  I'm sure a 2 or 3 line perl script would do it too, but I'm
> not that familiar with perl at this point.  I would rather spend time
> working on the actual C code.

        Dear Wes:

        Under Debian LINUX, there is a tool that might be of use:
fromdos and todos .  These are also referenced under some distributions as
dos2unix and unix2dos.  There are also scripts floating around that would
do this.   Under Debian, these utilities seem to come from the sysutils
package.  I am sure that RedHat and other distributions would have these
tools too.   By writing a little Cshell script to wrap these tools, you
could accomplish what you want.

                                Tom Wallis

        

 > 
> 
> 
> Wes
> ---
> This is the Air Capitol Linux Users Group discussion list.  If you
> want to unsubscribe, send the word "unsubscribe" to
> aclug-L-request@xxxxxxxxxxxx.  If you want to post to the list, send your
> message to aclug-L@xxxxxxxxxxxx.
> 

Disclaimer: All opinions expressed here are my own and not those of WSU.

EMAIL address:  wallis@xxxxxxxxxxx    wallis@xxxxxxxxxxxxxxxxxx  

   


---
This is the Air Capitol Linux Users Group discussion list.  If you
want to unsubscribe, send the word "unsubscribe" to
aclug-L-request@xxxxxxxxxxxx.  If you want to post to the list, send your
message to aclug-L@xxxxxxxxxxxx.



[Prev in Thread] Current Thread [Next in Thread]