/usr/bin/refdb_dos2unix is in refdb-clients 1.0.2-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | #!/bin/bash
# dos2unix - converts files with DOS-style line endings to Unix-style
# this implementation is just a semi-intelligent wrapper
# for tr
# Markus Hoenicka <markus@mhoenicka.de> 010930
# $Id: refdb_dos2unix.in,v 1.1.2.1 2005/03/29 20:35:06 mhoenicka Exp $
# OPTIONS: -h (invoke help)
# relies on these external programs: tr
### start user-customizable section
### end user-customizable section
# read the command line options
while getopts ":h" opt; do
case $opt in
h ) echo "converts files with DOS line ending (\\r\\n) to UNIX (\\n)"
echo 'usage: dos2unix [-h] file1 [file2...]'
echo "Options: -h print this help and exit"
exit 0 ;;
\? ) echo 'usage: dos2unix [-h] file1 [file2...]'
exit 1;;
esac
done
# correct the index so the filename argument is always $1
shift $(($OPTIND - 1))
for filename in $*; do
tr -d '\r' < $filename > $filename.$$
mv $filename.$$ $filename
done
exit 0
|