1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-15 23:50:44 +00:00
freebsd-ports/emulators/vMac/files/dos2unx

24 lines
460 B
Plaintext
Raw Normal View History

#!/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