On Mon, May 09, 2005 at 12:34:08AM +0300, Giorgos Keramidas wrote:
No tool is needed, as long as you have FreebSD's shell, sed grep:
$ find . | while read fname ;do
if grep '^M' ${fname} /dev/null 21 ;then
sed -i '' -e 's/^M//g' ${fname}
fi
On 2005-05-09 12:21, cpghost [EMAIL PROTECTED] wrote:
On Mon, May 09, 2005 at 12:34:08AM +0300, Giorgos Keramidas wrote:
No tool is needed, as long as you have FreebSD's shell, sed grep:
$ find . | while read fname ;do
if grep '^M' ${fname} /dev/null 21 ;then
sed
- Original Message -
From: Giorgos Keramidas [EMAIL PROTECTED]
To: cpghost [EMAIL PROTECTED]
Subject: Re: On removing ^M
Date: Mon, 9 May 2005 13:29:46 +0300
On 2005-05-09 12:21, cpghost [EMAIL PROTECTED] wrote:
On Mon, May 09, 2005 at 12:34:08AM +0300, Giorgos Keramidas wrote
On 2005-05-09 14:13, Fafa Hafiz Krantz [EMAIL PROTECTED] wrote:
So in conclusion, does this sh script look good?
I mean, can the first 3 commands be put like that?
$ chown -R fafa:wheel *
$ find . -type d -exec chmod 755 {} \;
$ find . -type f -exec chmod 644 {} \;
Yes. That looks fine.
Good day all!
I am aware of the port unix2dos (dos2unix) as a tool to
remove ^Ms from ASCII files.
But if you execute dos2unix in a directory where some files
contain ^M (CR/LF) and some files don't (CR), then dos2unix
will make a mess of those files who don't.
I am wondering what is needed
: Sunday, May 08, 2005 9:20 PM
Subject: On removing ^M
Good day all!
I am aware of the port unix2dos (dos2unix) as a tool to
remove ^Ms from ASCII files.
But if you execute dos2unix in a directory where some files
contain ^M (CR/LF) and some files don't (CR), then dos2unix
will make a mess of those
On Sun, 08 May 2005 14:20:19 -0500
Fafa Hafiz Krantz [EMAIL PROTECTED] wrote:
I am wondering what is needed (what tool or what code) to
do a mass (recursive) removal of ^Ms?
try:
tr -d \r input-file output-file
--
regisr
___
regisr wrote:
On Sun, 08 May 2005 14:20:19 -0500
Fafa Hafiz Krantz [EMAIL PROTECTED] wrote:
I am wondering what is needed (what tool or what code) to
do a mass (recursive) removal of ^Ms?
try:
tr -d \r input-file output-file
Or:
perl -pi -e 's/\015//' *.c
which will edit all .c files in
On Sun, 08 May 2005 12:53:06 -0700
tr -d \r input-file output-file
Or:
perl -pi -e 's/\015//' *.c
which will edit all .c files in place, or:
perl -pi.bak -e's/\015//' *.c
(I forget to add a for or foreach line!)
If there is a large number of files (i.e. if the command is too
long -
On 2005-05-08 14:20, Fafa Hafiz Krantz [EMAIL PROTECTED] wrote:
Good day all!
I am aware of the port unix2dos (dos2unix) as a tool to
remove ^Ms from ASCII files.
But if you execute dos2unix in a directory where some files
contain ^M (CR/LF) and some files don't (CR), then dos2unix
will
+++ Fafa Hafiz Krantz [freebsd] [08-05-05 14:20 -0500]:
|
| Good day all!
|
| I am aware of the port unix2dos (dos2unix) as a tool to
| remove ^Ms from ASCII files.
|
| But if you execute dos2unix in a directory where some files
| contain ^M (CR/LF) and some files don't (CR), then dos2unix
|
11 matches
Mail list logo