wagoneers.com




#!/bin/sh
#  fixcr.sh
#
USAGE=" example: fixcr microslop.txt "
#
#
# script removes carriage return peculiar to Microsoft files.
#
#   (useful if you've ftp'd from a pc using binary mode, or are
#    moving files across a samba mount.  
#     microsoft adds extra characters, this script removes them.)
#
# Date: March 8, 2002
#  authors: doug matthews, john meister and bronson yi
#
# tr removes the "extra" carriage return, a temporary file
#    is created in current directory, if needed move file to
#    /tmp and execute there. 
#

FILENAME=$1

if  file $1 | grep ascii  > /dev/null 2>&1

then
	echo "file is ascii, editing..."
echo " "
	mv $FILENAME $FILENAME.tmp
	tr -d '\015' < $FILENAME.tmp >$FILENAME
	rm $FILENAME.tmp

else

	echo " "
	echo "not an ascii file NOT edited!!!"
	 echo " "
fi

echo " "
echo "script complete"


 



wagoneers.com




Select pages from WAGONEERS.COM: 

the Full Size Jeep decal! © 1998-2000 John Meister
Buy this FSJ decal...   ...use PayPal to pay for it!
Make payments with PayPal, or sign up here!


a viable option to bloated and unstable code


AMSOIL synthetic lubricants and filters
(please use customer #283461)

Independent Lifetime Dealer John Meister - customer #283461 - since 1983


Shop AMAZON.com from wagoneers.com! 
Search:
Keywords:
SHOP from wagoneers.com: in Association with Amazon.com



these pages protected by US Copyright laws
John Meister copyright © 1995-2001 all rights reserved
contact john-at-wagoneers.com
"Join the fight against spam (UCE)! Eliminate spam!" Washington State has a $500 fine for "spam"
(unsolicited commercial email)!


this is an approved Family-Friendly Site       read the Bible