1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-25 21:07:40 +00:00
freebsd-ports/emulators/vMac/files/dos2unx
Donald Burr d5b0f28017 PR: ports/12597
Submitted by:	troll@digitalspark.net
Reviewed by:	dburr@FreeBSD.ORG
Import of new port emulators/vMac, a software Macintosh emulator.
(Requires an image of a MacPlus ROM to work, read the vMac website
for more details.)
1999-08-29 05:51:19 +00:00

24 lines
460 B
Bash

#!/bin/sh
#
# dos2unx file [file...]
#
# Converts text files (names specified on command line) from MS-DOS
# format to UNIX format. Essentially, gets rid of all newlines (\n),
# since linefeeds (\l) are all it needs.
if [ $# -lt 1 ]
then
echo usage: dos2unx file [file ...]
exit 1
fi
for FILE
do
echo -n "dos2unx: converting ${FILE} ... "
tr -d '\r' < ${FILE} > /tmp/conv$$
rm -f ${FILE}
cp -f /tmp/conv$$ ${FILE}
rm -f /tmp/conv$$
echo "done"
done