blob: f250b4b586ff17a401910193c300c38c51d9ff02 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/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
|